24 lines
No EOL
613 B
JavaScript
24 lines
No EOL
613 B
JavaScript
describe('template spec', () => {
|
|
beforeEach(() => {
|
|
cy.visit('./../modal.html')
|
|
})
|
|
|
|
it('Affiche le titre de la page', () => {
|
|
cy.get('h1').should('contain.text', 'Modal')
|
|
})
|
|
|
|
it('Ouvre la modal', () => {
|
|
cy.get('button').click()
|
|
cy.get('div[x-show="isModalVisible"]').should('not.have.attr', 'style')
|
|
})
|
|
|
|
it('Ferme la modal', () => {
|
|
cy.get('body').click(0, 0)
|
|
})
|
|
|
|
it('Regarde si la modal a un h2', () => {
|
|
cy.get('button').click()
|
|
cy.get('div[x-show="isModalVisible"]').should('not.have.attr', 'style')
|
|
cy.get('h2').should('contain.text', 'Lorem Ipsum')
|
|
})
|
|
}) |