Replace networkidle with web assertions
This commit is contained in:
parent
30e27254c1
commit
bdb4fa35fe
|
@ -32,6 +32,12 @@ test.describe( 'Add variable product', () => {
|
|||
}
|
||||
);
|
||||
|
||||
await test.step( 'Expect permalink to appear.', async () => {
|
||||
const permalink = page.locator( '#sample-permalink' );
|
||||
|
||||
await expect( permalink ).toBeVisible();
|
||||
} );
|
||||
|
||||
await test.step(
|
||||
'Select the "Variable product" product type.',
|
||||
async () => {
|
||||
|
|
|
@ -223,8 +223,11 @@ test.describe( 'Update variations', () => {
|
|||
} );
|
||||
|
||||
await test.step( 'Click "Save changes".', async () => {
|
||||
await page.locator( 'button.save-variation-changes' ).click();
|
||||
await page.waitForLoadState( 'networkidle' );
|
||||
const saveButton = page.getByRole( 'button', {
|
||||
name: 'Save changes',
|
||||
} );
|
||||
await saveButton.click();
|
||||
await expect( saveButton ).toBeDisabled();
|
||||
} );
|
||||
|
||||
await test.step( 'Click on the "Variations" tab.', async () => {
|
||||
|
@ -549,8 +552,11 @@ test.describe( 'Update variations', () => {
|
|||
} );
|
||||
|
||||
await test.step( 'Click "Save changes"', async () => {
|
||||
await page.getByRole( 'button', { name: 'Save changes' } ).click();
|
||||
await page.waitForLoadState( 'networkidle' );
|
||||
const saveButton = page.getByRole( 'button', {
|
||||
name: 'Save changes',
|
||||
} );
|
||||
await saveButton.click();
|
||||
await expect( saveButton ).toBeDisabled();
|
||||
} );
|
||||
|
||||
await test.step( 'View the product from the shop', async () => {
|
||||
|
|
Loading…
Reference in New Issue