mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-09-24 16:40:55 -06:00
Update commands.js
This commit is contained in:
parent
4f607df759
commit
11e59915cc
@ -16,16 +16,16 @@ Cypress.Commands.add(
|
||||
|
||||
Cypress.Commands.add('previewOn' , () => {
|
||||
cy.get('.EasyMDEContainer .editor-preview').should('not.be.visible');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.preview').should('not.have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.preview').click();
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.preview').should('have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.mde-preview').should('not.have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.mde-preview').click();
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.mde-preview').should('have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-preview').should('be.visible');
|
||||
});
|
||||
|
||||
Cypress.Commands.add('previewOff' , () => {
|
||||
cy.get('.EasyMDEContainer .editor-preview').should('be.visible');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.preview').should('have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.preview').click();
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.preview').should('not.have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.mde-preview').should('have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.mde-preview').click();
|
||||
cy.get('.EasyMDEContainer .editor-toolbar button.mde-preview').should('not.have.class', 'active');
|
||||
cy.get('.EasyMDEContainer .editor-preview').should('not.be.visible');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user