mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-12-08 00:44: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', () => {
|
it('should switch language from EN (default) to FR', () => {
|
||||||
cy.get('h1').contains('I am Divlo')
|
cy.get('h1').contains('I am Divlo')
|
||||||
cy.get('[data-cy=language-flag-text]').contains('EN')
|
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=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] > 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('[data-cy=language-flag-text]').contains('FR')
|
||||||
cy.get('h1').contains('Je suis Divlo')
|
cy.get('h1').contains('Je suis Divlo')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should close the language list menu when clicking outside', () => {
|
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=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('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