From 6776f8295287d7e61dd40054c8c66b2dbf00a796 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 13 May 2026 10:03:28 +0100 Subject: [PATCH] Wait for parsing and syntax highlighting in autocomplete Cypress tests (#33667) * Wait for parsing and syntax highlighting in autocomplete Cypress tests * Wait for syntax highlighting in write-and-cite Cypress tests GitOrigin-RevId: d48f10c864b0a170b4a02e95e3a989fdc4137dbb --- .../components/codemirror-editor-autocomplete.spec.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/test/frontend/features/source-editor/components/codemirror-editor-autocomplete.spec.tsx b/services/web/test/frontend/features/source-editor/components/codemirror-editor-autocomplete.spec.tsx index 8b29a79da6..62c063c2e8 100644 --- a/services/web/test/frontend/features/source-editor/components/codemirror-editor-autocomplete.spec.tsx +++ b/services/web/test/frontend/features/source-editor/components/codemirror-editor-autocomplete.spec.tsx @@ -75,7 +75,7 @@ describe('autocomplete', { scrollBehavior: false }, function () { cy.get('.cm-editor').as('editor') - cy.contains('\\section{Results}') + cy.get('.tok-keyword') // wait for parsing and syntax highlighting // no autocomplete cy.findAllByRole('listbox').should('have.length', 0) @@ -222,7 +222,7 @@ describe('autocomplete', { scrollBehavior: false }, function () { cy.get('.cm-editor').as('editor') - cy.contains('\\section{Results}') + cy.get('.tok-keyword') // wait for parsing and syntax highlighting // put the cursor on a blank line to type in cy.get('.cm-line').eq(16).as('line') @@ -461,7 +461,7 @@ describe('autocomplete', { scrollBehavior: false }, function () { cy.get('.cm-editor').as('editor') - cy.contains('\\section{Results}') + cy.get('.tok-keyword') // wait for parsing and syntax highlighting // no autocomplete cy.findAllByRole('listbox').should('have.length', 0)