From dc3207726e6796c67e0e3f2f90d67003dbbd35cb Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Fri, 1 Aug 2025 10:07:53 +0200 Subject: [PATCH] Merge pull request #27578 from overleaf/jpa-fix-saas-e2e [saas-e2e] fix all the broken tests GitOrigin-RevId: 38e16abc5e2c9392b0d9e585b6bef27a51c386f5 --- server-ce/test/editor.spec.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server-ce/test/editor.spec.ts b/server-ce/test/editor.spec.ts index 3e57b94f8f..db1b9301dc 100644 --- a/server-ce/test/editor.spec.ts +++ b/server-ce/test/editor.spec.ts @@ -56,15 +56,18 @@ describe('editor', () => { cy.log('edit project file') cy.get('.cm-line').type(word) + cy.findByText(word).should('have.class', 'ol-cm-spelling-error') - cy.get('.ol-cm-spelling-error').should('exist') + changeSpellCheckLanguageTo('Off') + cy.findByText(word).should('not.have.class', 'ol-cm-spelling-error') changeSpellCheckLanguageTo('Spanish') + cy.findByText(word).should('have.class', 'ol-cm-spelling-error') cy.log('add word to dictionary') - cy.get('.ol-cm-spelling-error').contains(word).rightclick() - cy.findByText('Add to dictionary').click() - cy.get('.ol-cm-spelling-error').should('not.exist') + cy.findByText(word).rightclick() + cy.findByRole('menuitem', { name: 'Add to dictionary' }).click() + cy.findByText(word).should('not.have.class', 'ol-cm-spelling-error') cy.log('remove word from dictionary') cy.get('button').contains('Menu').click()