@@ -90,7 +90,11 @@ async function navigateToHome() {
9090 await browser . pause ( 2_000 ) ;
9191 const homeText = await waitForHomePage ( 15_000 ) ;
9292 if ( ! homeText ) {
93- try { await clickNativeButton ( 'Home' , 5_000 ) ; } catch { /* ignore */ }
93+ try {
94+ await clickNativeButton ( 'Home' , 5_000 ) ;
95+ } catch {
96+ /* ignore */
97+ }
9498 await browser . pause ( 2_000 ) ;
9599 await waitForHomePage ( 10_000 ) ;
96100 }
@@ -108,12 +112,14 @@ async function navigateToBilling() {
108112 // Wait for Settings page content.
109113 // Note: "Billing & Usage" contains "&" which breaks XPath — use "Billing" only.
110114 const settingsLoaded =
111- ( await textExists ( 'Billing' ) ) ||
112- ( await textExists ( 'Profile' ) ) ||
113- ( await textExists ( 'Privacy' ) ) ;
115+ ( await textExists ( 'Billing' ) ) || ( await textExists ( 'Profile' ) ) || ( await textExists ( 'Privacy' ) ) ;
114116 if ( ! settingsLoaded ) {
115117 console . log ( '[AuthAccess] Settings page not loaded, retrying click...' ) ;
116- try { await clickNativeButton ( 'Settings' , 5_000 ) ; } catch { /* ignore */ }
118+ try {
119+ await clickNativeButton ( 'Settings' , 5_000 ) ;
120+ } catch {
121+ /* ignore */
122+ }
117123 await browser . pause ( 3_000 ) ;
118124 }
119125
@@ -165,21 +171,32 @@ async function performFullLogin(token = 'e2e-test-token') {
165171 await browser . pause ( 2_000 ) ;
166172
167173 for ( const text of [ 'Looks Amazing' , 'Bring It On' ] ) {
168- if ( await textExists ( text ) ) { await clickText ( text , 5_000 ) ; break ; }
174+ if ( await textExists ( text ) ) {
175+ await clickText ( text , 5_000 ) ;
176+ break ;
177+ }
169178 }
170179 await browser . pause ( 2_000 ) ;
171180
172181 for ( const text of [ 'Got it' , 'Continue' ] ) {
173- if ( await textExists ( text ) ) { await clickText ( text , 5_000 ) ; break ; }
182+ if ( await textExists ( text ) ) {
183+ await clickText ( text , 5_000 ) ;
184+ break ;
185+ }
174186 }
175187 await browser . pause ( 2_000 ) ;
176188
177189 for ( const text of [ "Let's Go" , "I'm Ready" ] ) {
178- if ( await textExists ( text ) ) { await clickText ( text , 5_000 ) ; break ; }
190+ if ( await textExists ( text ) ) {
191+ await clickText ( text , 5_000 ) ;
192+ break ;
193+ }
179194 }
180195 await browser . pause ( 3_000 ) ;
181196 } else {
182- console . log ( '[AuthAccess] Onboarding overlay not visible — skipping (WKWebView portal limitation)' ) ;
197+ console . log (
198+ '[AuthAccess] Onboarding overlay not visible — skipping (WKWebView portal limitation)'
199+ ) ;
183200 await browser . pause ( 3_000 ) ;
184201 }
185202
@@ -223,7 +240,11 @@ describe('Auth & Access Control', () => {
223240
224241 const homeText = await waitForHomePage ( 15_000 ) ;
225242 if ( ! homeText ) {
226- try { await clickNativeButton ( 'Home' , 5_000 ) ; } catch { /* ignore */ }
243+ try {
244+ await clickNativeButton ( 'Home' , 5_000 ) ;
245+ } catch {
246+ /* ignore */
247+ }
227248 await browser . pause ( 2_000 ) ;
228249 }
229250 const finalHome = homeText || ( await waitForHomePage ( 10_000 ) ) ;
@@ -238,7 +259,11 @@ describe('Auth & Access Control', () => {
238259
239260 const homeText = await waitForHomePage ( 15_000 ) ;
240261 if ( ! homeText ) {
241- try { await clickNativeButton ( 'Home' , 5_000 ) ; } catch { /* ignore */ }
262+ try {
263+ await clickNativeButton ( 'Home' , 5_000 ) ;
264+ } catch {
265+ /* ignore */
266+ }
242267 await browser . pause ( 2_000 ) ;
243268 }
244269 const finalHome = homeText || ( await waitForHomePage ( 10_000 ) ) ;
@@ -259,8 +284,7 @@ describe('Auth & Access Control', () => {
259284 await navigateToBilling ( ) ;
260285
261286 // BillingPanel heading: "Current Plan — FREE"
262- const hasPlan =
263- ( await textExists ( 'Current Plan' ) ) || ( await textExists ( 'FREE' ) ) ;
287+ const hasPlan = ( await textExists ( 'Current Plan' ) ) || ( await textExists ( 'FREE' ) ) ;
264288 if ( ! hasPlan ) {
265289 const tree = await dumpAccessibilityTree ( ) ;
266290 console . log ( '[AuthAccess] Billing page tree:\n' , tree . slice ( 0 , 6000 ) ) ;
@@ -295,8 +319,7 @@ describe('Auth & Access Control', () => {
295319 }
296320
297321 // Verify purchasing state appears
298- const hasWaiting =
299- ( await textExists ( 'Waiting' ) ) || ( await textExists ( 'Waiting for payment' ) ) ;
322+ const hasWaiting = ( await textExists ( 'Waiting' ) ) || ( await textExists ( 'Waiting for payment' ) ) ;
300323 console . log ( `[AuthAccess] Purchasing state visible: ${ hasWaiting } ` ) ;
301324
302325 // Switch mock to BASIC plan so polling clears the waiting state
@@ -334,7 +357,9 @@ describe('Auth & Access Control', () => {
334357
335358 // Check that plan info is displayed (Current Plan heading or tier name)
336359 const hasPlanInfo =
337- ( await textExists ( 'Current Plan' ) ) || ( await textExists ( 'BASIC' ) ) || ( await textExists ( 'Basic' ) ) ;
360+ ( await textExists ( 'Current Plan' ) ) ||
361+ ( await textExists ( 'BASIC' ) ) ||
362+ ( await textExists ( 'Basic' ) ) ;
338363 expect ( hasPlanInfo ) . toBe ( true ) ;
339364
340365 // "Manage" button appears when hasActiveSubscription is true in currentPlan response.
@@ -352,7 +377,9 @@ describe('Auth & Access Control', () => {
352377 // If "Manage" is visible, click it and verify portal API call.
353378 const hasManage = await textExists ( 'Manage' ) ;
354379 if ( ! hasManage ) {
355- console . log ( '[AuthAccess] 3.3.3 — Manage button not visible (team subscription stale). Skipping portal click.' ) ;
380+ console . log (
381+ '[AuthAccess] 3.3.3 — Manage button not visible (team subscription stale). Skipping portal click.'
382+ ) ;
356383 // Verify the portal endpoint works by calling it programmatically
357384 // (the mock server handles POST /payments/stripe/portal)
358385 resetMockBehavior ( ) ;
@@ -388,7 +415,11 @@ describe('Auth & Access Control', () => {
388415
389416 const homeCheck = await waitForHomePage ( 10_000 ) ;
390417 if ( ! homeCheck ) {
391- try { await clickNativeButton ( 'Home' , 5_000 ) ; } catch { /* ignore */ }
418+ try {
419+ await clickNativeButton ( 'Home' , 5_000 ) ;
420+ } catch {
421+ /* ignore */
422+ }
392423 await browser . pause ( 2_000 ) ;
393424 }
394425
0 commit comments