File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -113,20 +113,16 @@ export const getShopper = async (
113
113
await wpAdminLogin ( shopperPage , config . users . customer ) ;
114
114
await shopperPage . waitForLoadState ( 'networkidle' ) ;
115
115
await shopperPage . goto ( '/my-account' ) ;
116
-
117
- // Wait for the logout link to be visible with a reasonable timeout
118
- await expect (
116
+ expect (
119
117
shopperPage . locator (
120
118
'.woocommerce-MyAccount-navigation-link--customer-logout'
121
119
)
122
- ) . toBeVisible ( { timeout : 10000 } ) ;
123
-
124
- // Wait for the welcome message with a reasonable timeout
120
+ ) . toBeVisible ( ) ;
125
121
await expect (
126
122
shopperPage . locator (
127
123
'div.woocommerce-MyAccount-content > p >> nth=0'
128
124
)
129
- ) . toContainText ( 'Hello' , { timeout : 10000 } ) ;
125
+ ) . toContainText ( 'Hello' ) ;
130
126
await shopperPage
131
127
. context ( )
132
128
. storageState ( { path : customerStorageFile } ) ;
@@ -211,10 +207,10 @@ export const loginAsCustomer = async (
211
207
page . locator (
212
208
'.woocommerce-MyAccount-navigation-link--customer-logout'
213
209
)
214
- ) . toBeVisible ( { timeout : 10000 } ) ;
210
+ ) . toBeVisible ( ) ;
215
211
await expect (
216
212
page . locator ( 'div.woocommerce-MyAccount-content > p >> nth=0' )
217
- ) . toContainText ( 'Hello' , { timeout : 10000 } ) ;
213
+ ) . toContainText ( 'Hello' ) ;
218
214
219
215
console . log ( 'Logged-in as customer successfully.' ) ;
220
216
customerLoggedIn = true ;
You can’t perform that action at this time.
0 commit comments