Fix flaky product variations test (#50807)

Co-authored-by: Jon Lane <jon.lane@automattic.com>
This commit is contained in:
Jonathan Lane 2024-08-20 13:35:21 -07:00 committed by GitHub
parent 7e08187671
commit 02596ba4b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fixes a flaky product variations e2e test

View File

@ -367,10 +367,14 @@ test.describe( 'Variations tab', { tag: '@gutenberg' }, () => {
await page.getByLabel( 'Delete variation' ).click(); await page.getByLabel( 'Delete variation' ).click();
const element = page.locator( 'div.components-snackbar__content' ); await expect(
await expect( await element.innerText() ).toMatch( page.getByText( '1 variation deleted.' )
'1 variation deleted.' ).toBeVisible();
);
await page.waitForSelector(
'div.woocommerce-product-variations-pagination__info',
{ timeout: 20000 }
); // test was timing out before page loaded
await expect( await expect(
await page await page