Skip to content

Commit 645a093

Browse files
committed
text(cy): Fix CSS selectors for readonly bar
Signed-off-by: Jonas <jonas@freesources.org>
1 parent efae070 commit 645a093

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cypress/e2e/openreadonly.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('Open read-only mode', function() {
2525

2626
describe('Disabled', function() {
2727
const checkMenubar = function() {
28-
cy.get('.text-editor--readonly-bar').should('not.exist')
28+
cy.get('[data-text-el="readonly-bar"]').should('not.exist')
2929
cy.get('.text-menubar', { timeout: 10000 })
3030
.getActionEntry('done').should('not.exist')
3131
}
@@ -52,12 +52,12 @@ describe('Open read-only mode', function() {
5252

5353
describe('Enabled', function() {
5454
const requireReadOnlyBar = function() {
55-
cy.get('.text-editor--readonly-bar').should('exist')
56-
cy.get('.text-editor--readonly-bar').getActionEntry('edit').should('exist')
55+
cy.get('[data-text-el="readonly-bar"]').should('exist')
56+
cy.get('[data-text-el="readonly-bar"]').getActionEntry('edit').should('exist')
5757
}
5858

5959
const requireMenubar = function() {
60-
cy.get('.text-editor--readonly-bar').should('not.exist')
60+
cy.get('[data-text-el="readonly-bar"]').should('not.exist')
6161
cy.get('.text-menubar').getActionEntry('done').should('exist')
6262
}
6363

@@ -76,7 +76,7 @@ describe('Open read-only mode', function() {
7676
requireReadOnlyBar()
7777

7878
// Switch to edit-mode
79-
cy.get('.text-editor--readonly-bar').getActionEntry('edit').click()
79+
cy.get('[data-text-el="readonly-bar"]').getActionEntry('edit').click()
8080

8181
requireMenubar()
8282

@@ -92,10 +92,10 @@ describe('Open read-only mode', function() {
9292
requireReadOnlyBar()
9393

9494
// Switch to edit-mode
95-
cy.get('.text-editor--readonly-bar').getActionEntry('edit').click()
95+
cy.get('[data-text-el="readonly-bar"]').getActionEntry('edit').click()
9696

9797
// Check that read-only bar does not exist
98-
cy.get('.text-editor--readonly-bar').should('not.exist')
98+
cy.get('[data-text-el="readonly-bar"]').should('not.exist')
9999
})
100100
})
101101
})

cypress/e2e/share.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('Open test.md in viewer', function() {
4040
.should('contain', 'Hello world')
4141
.find('h2').should('contain', 'Hello world')
4242

43-
cy.get('.text-editor--readonly-bar')
43+
cy.get('[data-text-el="readonly-bar"]')
4444
.getActionEntry('outline')
4545
.click()
4646

0 commit comments

Comments
 (0)