1
0
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:
Arnab Sen
2022-04-16 00:31:32 +05:30
parent 432143ba3e
commit f6cf7766f3
13 changed files with 269 additions and 1 deletions

View 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');
});
});