Fix flaky e2e test merchant filling regular price in inventory tab (#49226)
This commit is contained in:
parent
b83eed8869
commit
1a94d68d2b
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
E2E tests: Fix flaky filling regular price in the inventory tab
|
|
@ -269,6 +269,16 @@ test.describe( 'Variations tab', { tag: '@gutenberg' }, () => {
|
|||
|
||||
await getVariationsResponsePromise;
|
||||
|
||||
// Wait for response only to avoid flaky filling regular price below in Inventory tab
|
||||
const waitResponse = page.waitForResponse(
|
||||
( response ) =>
|
||||
response
|
||||
.url()
|
||||
.includes(
|
||||
'wp-json/wc-admin/options?options=woocommerce_dimension_unit'
|
||||
) && response.status() === 200
|
||||
);
|
||||
|
||||
await page
|
||||
.locator( '.woocommerce-product-variations__table-body > div' )
|
||||
.first()
|
||||
|
@ -286,6 +296,8 @@ test.describe( 'Variations tab', { tag: '@gutenberg' }, () => {
|
|||
.getByLabel( 'Regular price', { exact: true } )
|
||||
.waitFor( { state: 'visible' } );
|
||||
|
||||
await waitResponse;
|
||||
|
||||
await page
|
||||
.getByLabel( 'Regular price', { exact: true } )
|
||||
.pressSequentially( '100' );
|
||||
|
|
Loading…
Reference in New Issue