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 4effe7e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 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,7 @@ variants.forEach(function({ fixture, mime }) {
cy.get('[data-cy="resolveThisVersion"]').click()

getWrapper()
.get('#read-only-editor')
.find('#read-only-editor')
.should('not.exist')

cy.get('[data-cy="resolveThisVersion"]')
Expand All @@ -106,11 +106,11 @@ variants.forEach(function({ fixture, mime }) {
cy.openFile(fileName)

getWrapper()
.get('[data-cy="resolveServerVersion"]')
.find('[data-cy="resolveServerVersion"]')
.click()

getWrapper()
.get('#read-only-editor')
.find('#read-only-editor')
.should('not.exist')
cy.get('[data-cy="resolveThisVersion"]')
.should('not.exist')
Expand Down

0 comments on commit 4effe7e

Please sign in to comment.