From bcdda478a20b37d0d39f38c44b6b3ac1734b35fb Mon Sep 17 00:00:00 2001 From: Vinicius Reis Date: Mon, 25 Apr 2022 22:02:45 -0300 Subject: =?UTF-8?q?=E2=9C=85=20fix=20some=20cypress=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinicius Reis --- cypress/integration/workspace.spec.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'cypress') 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') -- cgit v1.2.3