mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-29 01:30:16 +02:00
Cypress integrated with some tests
This commit is contained in:
27
cypress/integration/modals.test.js
Normal file
27
cypress/integration/modals.test.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Modals pop-up when header btns are pressed', () => {
|
||||
beforeEach(() => {
|
||||
cy.init();
|
||||
});
|
||||
|
||||
// Selectors for each button
|
||||
const ADD_LIBRARY_SEL = '[data-event-action=addLibraryButtonClick]';
|
||||
const NEW_SEL = '[aria-label="Start a new creation"]';
|
||||
const LOGIN_SEL = '[data-event-action=loginButtonClick]';
|
||||
|
||||
it('Add Library', () => {
|
||||
cy.get(ADD_LIBRARY_SEL).click();
|
||||
cy.get('.modal__content').should('be.visible');
|
||||
});
|
||||
|
||||
it('+ New', () => {
|
||||
cy.get(NEW_SEL).click();
|
||||
cy.get('.modal__content').should('be.visible');
|
||||
});
|
||||
|
||||
it('Login/SignUp', () => {
|
||||
cy.get(LOGIN_SEL).click();
|
||||
cy.get('.modal__content').should('be.visible');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user