Add waitForNavigation on Continue clicking
This commit is contained in:
parent
bc40163155
commit
bdd9fe7318
|
@ -43,8 +43,11 @@ const runImportProductsTest = () => {
|
||||||
await merchant.openImportProducts();
|
await merchant.openImportProducts();
|
||||||
});
|
});
|
||||||
it('should show error message if you go without providing CSV file', async () => {
|
it('should show error message if you go without providing CSV file', async () => {
|
||||||
// Verify error message if you go without providing CSV file
|
// Verify the error message if you go without providing CSV file
|
||||||
await expect(page).toClick('button[value="Continue"]');
|
await Promise.all( [
|
||||||
|
page.click( 'button[value="Continue"]' ),
|
||||||
|
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
|
||||||
|
]);
|
||||||
await page.waitForSelector('div.error');
|
await page.waitForSelector('div.error');
|
||||||
await expect(page).toMatchElement('div.error > p', errorMessage);
|
await expect(page).toMatchElement('div.error > p', errorMessage);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue