diff options
author | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-04-26 04:02:45 +0300 |
---|---|---|
committer | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-04-26 04:02:45 +0300 |
commit | 7aa0f9fa40adf24c32667e671bd4ddbde63a7a00 (patch) | |
tree | 2c008763c5f8f57e3b54be045acc17c078e50769 /cypress | |
parent | 58e285d7f07654c9772f41ae71ed5dfd1e4793a9 (diff) |
✅ fix some cypress tests
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/integration/workspace.spec.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/cypress/integration/workspace.spec.js b/cypress/integration/workspace.spec.js index ba41e828b..d5a81d201 100644 --- a/cypress/integration/workspace.spec.js +++ b/cypress/integration/workspace.spec.js @@ -96,13 +96,15 @@ describe('Workspace', function() { .type('Heading') .type('{selectall}') ;['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].forEach((heading) => { - menuButton('h1').click() - submenuButton(heading).click() + menuButton('h1').click({ force: true }) + submenuButton(heading).click({ force: true }) + menuButton(heading).should('have.class', 'is-active') + cy.get(`.ProseMirror ${heading}`) .should('contain', 'Heading') - menuButton(heading).click() - submenuButton(heading).click() + menuButton(heading).click({ force: true }) + submenuButton(heading).click({ force: true }) menuButton('h1').should('not.have.class', 'is-active') }) }) @@ -117,11 +119,11 @@ describe('Workspace', function() { ['tasklist', 'ul[data-type="taskList"]'], ].forEach(([button, tag]) => { menuButton(button) - .click() + .click({ force: true }) .should('have.class', 'is-active') cy.get(`.ProseMirror ${tag}`).should('contain', 'List me') menuButton(button) - .click() + .click({ force: true }) .should('not.have.class', 'is-active') }) }) @@ -159,8 +161,8 @@ describe('Workspace', function() { types.forEach(type => { // enable callout - menuButton('info').click() - submenuButton(type).click() + menuButton('info').click({ force: true }) + submenuButton(type).click({ force: true }) // check if is active menuButton(type).should('have.class', 'is-active') @@ -170,8 +172,8 @@ describe('Workspace', function() { .should('contain', 'Callout') // disable - menuButton(type).click() - submenuButton(type).click() + menuButton(type).click({ force: true }) + submenuButton(type).click({ force: true }) // check if is inactive menuButton('info').should('not.have.class', 'is-active') |