Skip to content

Commit

Permalink
tests: Make conflict dialog selector unique
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Sep 8, 2023
1 parent e165802 commit ce0efd6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cypress/e2e/conflict.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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')
})

Expand All @@ -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"]')
Expand All @@ -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')
Expand Down

0 comments on commit ce0efd6

Please sign in to comment.