mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-05 04:51:30 +01:00
test(e2e): visible instead of exist
This commit is contained in:
parent
fc5ba28b8a
commit
d794d38f14
@ -27,21 +27,21 @@ describe('Common > Header', () => {
|
||||
it('should switch language from EN (default) to FR', () => {
|
||||
cy.get('h1').contains('I am Divlo')
|
||||
cy.get('[data-cy=language-flag-text]').contains('EN')
|
||||
cy.get('[data-cy=languages-list]').should('not.exist')
|
||||
cy.get('[data-cy=languages-list]').should('not.be.visible')
|
||||
cy.get('[data-cy=language-click]').click()
|
||||
cy.get('[data-cy=languages-list]').should('exist')
|
||||
cy.get('[data-cy=languages-list]').should('be.visible')
|
||||
cy.get('[data-cy=languages-list] > li:first-child').contains('FR').click()
|
||||
cy.get('[data-cy=languages-list]').should('not.exist')
|
||||
cy.get('[data-cy=languages-list]').should('not.be.visible')
|
||||
cy.get('[data-cy=language-flag-text]').contains('FR')
|
||||
cy.get('h1').contains('Je suis Divlo')
|
||||
})
|
||||
|
||||
it('should close the language list menu when clicking outside', () => {
|
||||
cy.get('[data-cy=languages-list]').should('not.exist')
|
||||
cy.get('[data-cy=languages-list]').should('not.be.visible')
|
||||
cy.get('[data-cy=language-click]').click()
|
||||
cy.get('[data-cy=languages-list]').should('exist')
|
||||
cy.get('[data-cy=languages-list]').should('be.visible')
|
||||
cy.get('h1').click()
|
||||
cy.get('[data-cy=languages-list]').should('not.exist')
|
||||
cy.get('[data-cy=languages-list]').should('not.be.visible')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user