Skip to content

Commit 138f7ab

Browse files
committed
Remove timeouts in helpers
1 parent ce4716d commit 138f7ab

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/e2e/utils/helpers.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,16 @@ export const getShopper = async (
113113
await wpAdminLogin( shopperPage, config.users.customer );
114114
await shopperPage.waitForLoadState( 'networkidle' );
115115
await shopperPage.goto( '/my-account' );
116-
117-
// Wait for the logout link to be visible with a reasonable timeout
118-
await expect(
116+
expect(
119117
shopperPage.locator(
120118
'.woocommerce-MyAccount-navigation-link--customer-logout'
121119
)
122-
).toBeVisible( { timeout: 10000 } );
123-
124-
// Wait for the welcome message with a reasonable timeout
120+
).toBeVisible();
125121
await expect(
126122
shopperPage.locator(
127123
'div.woocommerce-MyAccount-content > p >> nth=0'
128124
)
129-
).toContainText( 'Hello', { timeout: 10000 } );
125+
).toContainText( 'Hello' );
130126
await shopperPage
131127
.context()
132128
.storageState( { path: customerStorageFile } );
@@ -211,10 +207,10 @@ export const loginAsCustomer = async (
211207
page.locator(
212208
'.woocommerce-MyAccount-navigation-link--customer-logout'
213209
)
214-
).toBeVisible( { timeout: 10000 } );
210+
).toBeVisible();
215211
await expect(
216212
page.locator( 'div.woocommerce-MyAccount-content > p >> nth=0' )
217-
).toContainText( 'Hello', { timeout: 10000 } );
213+
).toContainText( 'Hello' );
218214

219215
console.log( 'Logged-in as customer successfully.' );
220216
customerLoggedIn = true;

0 commit comments

Comments
 (0)