Make the selector a bit more strict to avoid collision (#36499)

This commit is contained in:
nigeljamesstevenson 2023-02-17 15:56:07 +00:00 committed by GitHub
commit 4b8e24cc9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Made e2e selectors more robust

View File

@ -233,7 +233,7 @@ test.describe( 'WooCommerce Orders > Refund and restock an order item', () => {
// Update the order
await page.click( 'button.save_order' );
await expect( page.locator( 'div.notice-success' ) ).toContainText(
await expect( page.locator( 'div.updated.notice-success' ) ).toContainText(
'Order updated.'
);

View File

@ -171,7 +171,7 @@ test.describe.serial( 'Import Products from a CSV file', () => {
// verify the error message if you go without providing CSV file
await page.click( 'button[value="Continue"]' );
await expect( page.locator( 'div.error' ) ).toContainText(
await expect( page.locator( 'div.error.inline' ) ).toContainText(
errorMessage
);
} );