From ce0efd6f002a8108e3f88d61f86b86c737b97ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 8 Sep 2023 14:40:15 +0200 Subject: [PATCH] tests: Make conflict dialog selector unique MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/e2e/conflict.spec.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/conflict.spec.js b/cypress/e2e/conflict.spec.js index a52b84c6f8b..9e5021dc6c1 100644 --- a/cypress/e2e/conflict.spec.js +++ b/cypress/e2e/conflict.spec.js @@ -32,7 +32,7 @@ const variants = [ variants.forEach(function({ fixture, mime }) { const fileName = fixture describe(`${mime} (${fileName})`, function() { - const getWrapper = () => cy.get('.text-editor__wrapper.has-conflicts') + const getWrapper = () => cy.get('.viewer__content .text-editor__wrapper.has-conflicts') before(() => { initUserAndFiles(user, fileName) @@ -56,13 +56,13 @@ variants.forEach(function({ fixture, mime }) { cy.openFile(fileName) cy.get('.text-editor .document-status .icon-error') getWrapper() - .get('#read-only-editor') + .find('#read-only-editor') .should('contain', 'Hello world') getWrapper() - .get('.text-editor__main') + .find('.text-editor__main') .should('contain', 'Hello world') getWrapper() - .get('.text-editor__main') + .find('.text-editor__main') .should('contain', 'cruel conflicting') }) @@ -81,7 +81,6 @@ variants.forEach(function({ fixture, mime }) { cy.get('[data-cy="resolveThisVersion"]').click() getWrapper() - .get('#read-only-editor') .should('not.exist') cy.get('[data-cy="resolveThisVersion"]') @@ -105,12 +104,10 @@ variants.forEach(function({ fixture, mime }) { cy.get('#viewer').should('not.exist') cy.openFile(fileName) - getWrapper() - .get('[data-cy="resolveServerVersion"]') + cy.get('[data-cy="resolveServerVersion"]') .click() getWrapper() - .get('#read-only-editor') .should('not.exist') cy.get('[data-cy="resolveThisVersion"]') .should('not.exist')