From 999b49c5ba9e07c0991e5b0cbfa2e4ac952fc738 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Thu, 14 Sep 2023 15:34:41 +1000 Subject: [PATCH] Puppeteer tests: Try to fix failing tests related to notices in core (#54452) --- packages/e2e-test-utils/src/posts.js | 2 +- packages/e2e-test-utils/src/trash-all-comments.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test-utils/src/posts.js b/packages/e2e-test-utils/src/posts.js index 722dd77f9939a..751a6d13fcf9d 100644 --- a/packages/e2e-test-utils/src/posts.js +++ b/packages/e2e-test-utils/src/posts.js @@ -41,7 +41,7 @@ export async function trashAllPosts( postType = 'post', postStatus ) { // Submit the form to send all draft/scheduled/published posts to the trash. await page.click( '#doaction' ); await page.waitForXPath( - '//*[contains(@class, "updated notice")]/p[contains(text(), "moved to the Trash.")]' + '//*[contains(@class, "notice")]/p[contains(text(), "moved to the Trash.")]' ); await switchUserToTest(); } diff --git a/packages/e2e-test-utils/src/trash-all-comments.js b/packages/e2e-test-utils/src/trash-all-comments.js index 97169e994d3ed..44c44b740be87 100644 --- a/packages/e2e-test-utils/src/trash-all-comments.js +++ b/packages/e2e-test-utils/src/trash-all-comments.js @@ -29,7 +29,7 @@ export async function trashAllComments() { // Submit the form to send all mine/pendings/approved/spam comments to the trash. await page.click( '#doaction' ); await page.waitForXPath( - '//*[contains(@class, "updated notice")]/p[contains(text(), "moved to the Trash.")]' + '//*[contains(@class, "notice")]/p[contains(text(), "moved to the Trash.")]' ); await switchUserToTest(); }