@@ -77,7 +77,9 @@ export async function clickFirstMatch(candidates, timeout = 5_000) {
7777
7878export async function navigateViaHash ( hash ) {
7979 try {
80- await browser . execute ( ( h ) => { window . location . hash = h ; } , hash ) ;
80+ await browser . execute ( h => {
81+ window . location . hash = h ;
82+ } , hash ) ;
8183 await browser . pause ( 2_000 ) ;
8284 const currentHash = await browser . execute ( ( ) => window . location . hash ) ;
8385 console . log ( `[E2E] Navigated to ${ hash } (current: ${ currentHash } )` ) ;
@@ -91,8 +93,12 @@ export async function navigateToHome() {
9193 const homeText = await waitForHomePage ( 10_000 ) ;
9294 if ( ! homeText ) {
9395 try {
94- await browser . execute ( ( ) => { window . location . hash = '/home' ; } ) ;
95- } catch { /* ignore */ }
96+ await browser . execute ( ( ) => {
97+ window . location . hash = '/home' ;
98+ } ) ;
99+ } catch {
100+ /* ignore */
101+ }
96102 await browser . pause ( 2_000 ) ;
97103 await waitForHomePage ( 10_000 ) ;
98104 }
@@ -108,7 +114,8 @@ export async function navigateToBilling() {
108114 const deadline = Date . now ( ) + 15_000 ;
109115 let hasBilling = false ;
110116 while ( Date . now ( ) < deadline ) {
111- hasBilling = ( await textExists ( 'Current Plan' ) ) ||
117+ hasBilling =
118+ ( await textExists ( 'Current Plan' ) ) ||
112119 ( await textExists ( 'FREE' ) ) ||
113120 ( await textExists ( 'Upgrade' ) ) ;
114121 if ( hasBilling ) break ;
@@ -131,8 +138,10 @@ export async function navigateToBilling() {
131138 const allText = document . querySelectorAll ( '*' ) ;
132139 for ( const el of allText ) {
133140 const text = el . textContent ?. trim ( ) || '' ;
134- if ( ( text === 'Billing & Usage' || text === 'Billing' ) &&
135- el . closest ( 'button, [role="button"], a, [class*="MenuItem"]' ) ) {
141+ if (
142+ ( text === 'Billing & Usage' || text === 'Billing' ) &&
143+ el . closest ( 'button, [role="button"], a, [class*="MenuItem"]' )
144+ ) {
136145 ( el . closest ( 'button, [role="button"], a, [class*="MenuItem"]' ) as HTMLElement ) . click ( ) ;
137146 return 'clicked' ;
138147 }
@@ -144,7 +153,8 @@ export async function navigateToBilling() {
144153 await browser . pause ( 3_000 ) ;
145154
146155 // Verify billing actually loaded after fallback
147- const finalCheck = ( await textExists ( 'Current Plan' ) ) ||
156+ const finalCheck =
157+ ( await textExists ( 'Current Plan' ) ) ||
148158 ( await textExists ( 'FREE' ) ) ||
149159 ( await textExists ( 'Upgrade' ) ) ;
150160 if ( ! finalCheck ) {
@@ -187,7 +197,8 @@ export async function navigateToConversations() {
187197export async function walkOnboarding ( logPrefix = '[E2E]' ) {
188198 // Detect onboarding overlay. The Onboarding.tsx parent renders a "Skip" defer
189199 // button (top-right), and step 0 is WelcomeStep with "Continue".
190- const onboardingVisible = ( await textExists ( 'Welcome' ) ) ||
200+ const onboardingVisible =
201+ ( await textExists ( 'Welcome' ) ) ||
191202 ( await textExists ( 'Skip' ) ) ||
192203 ( await textExists ( 'Use Local Models' ) ) ||
193204 ( await textExists ( 'Continue' ) ) ;
@@ -283,7 +294,7 @@ export async function walkOnboarding(logPrefix = '[E2E]') {
283294export async function performFullLogin (
284295 token = 'e2e-test-token' ,
285296 logPrefix = '[E2E]' ,
286- postLoginVerifier ?: ( logPrefix : string ) => Promise < void > ,
297+ postLoginVerifier ?: ( logPrefix : string ) => Promise < void >
287298) {
288299 await triggerAuthDeepLink ( token ) ;
289300 await waitForWindowVisible ( 25_000 ) ;
0 commit comments