diff --git a/test/e2e/support/setup-test-framework.js b/test/e2e/support/setup-test-framework.js index a7c09459deeda4..110388705949e6 100644 --- a/test/e2e/support/setup-test-framework.js +++ b/test/e2e/support/setup-test-framework.js @@ -52,7 +52,9 @@ afterAll( async () => { await page.select( '#bulk-action-selector-top', 'trash' ); // Submit the form to send all draft/scheduled/published posts to the trash. await page.click( '#doaction' ); - await page.waitForNavigation(); + await page.waitForXPath( + '//*[contains(@class, "updated notice")]/p[contains(text(), "moved to the Trash.")]' + ); } disablePageDialogAccept();