Fix flaky e2e merchant tests (#49381)

This commit is contained in:
Veljko V 2024-07-11 14:31:57 +02:00 committed by GitHub
parent d18a722501
commit e049d93681
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 4 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
E2E tests: Fix flaky merchant tests

View File

@ -128,7 +128,13 @@ test.describe( 'Merchant > Customer List', { tag: '@services' }, () => {
name: `All customers with names that include ${ customer.first_name } ${ customer.last_name }`,
exact: true,
} )
.waitFor( { state: 'visible' } );
.waitFor();
await page
.getByRole( 'option', {
name: `${ customer.first_name } ${ customer.last_name }`,
exact: true,
} )
.waitFor();
await page
.getByRole( 'option', {
name: `All customers with names that include ${ customer.first_name } ${ customer.last_name }`,

View File

@ -290,17 +290,17 @@ test.describe( 'Variations tab', { tag: '@gutenberg' }, () => {
.getByRole( 'tab', { name: 'General' } )
.click();
await page.getByLabel( 'Regular price', { exact: true } ).click();
await page
.getByLabel( 'Regular price', { exact: true } )
.waitFor( { state: 'visible' } );
await waitResponse;
await page.getByLabel( 'Regular price', { exact: true } ).click();
await page
.getByLabel( 'Regular price', { exact: true } )
.pressSequentially( '100' );
.fill( '100' );
await page
.locator( '.woocommerce-product-tabs' )