From d564cd44e950cedcd4a78bec5fae76c72130b4f6 Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Fri, 4 Oct 2024 17:29:38 -0400 Subject: [PATCH] chore: deflakes lexical e2e test (#8559) This has caused me great pain. The problem with this test is that the page was waiting for a URL which includes a search query that never arrives. This moves the check into a regex pattern for a more accurate catch. --- test/fields/collections/Lexical/e2e/blocks/e2e.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/fields/collections/Lexical/e2e/blocks/e2e.spec.ts b/test/fields/collections/Lexical/e2e/blocks/e2e.spec.ts index 60c881ed07..76d02ce139 100644 --- a/test/fields/collections/Lexical/e2e/blocks/e2e.spec.ts +++ b/test/fields/collections/Lexical/e2e/blocks/e2e.spec.ts @@ -870,7 +870,8 @@ describe('lexicalBlocks', () => { // navigate to list view await page.locator('.step-nav a').nth(1).click() - await page.waitForURL('**/lexical-fields?limit=10') + + await page.waitForURL(/^.*\/lexical-fields(\?.*)?$/) // Click on lexical document in list view (navigateToLexicalFields is client-side navigation which is what we need to reproduce the issue here) await navigateToLexicalFields(false)