diff --git a/cypress/integration/common/Header.spec.ts b/cypress/integration/common/Header.spec.ts index b41bfca..5a821e6 100644 --- a/cypress/integration/common/Header.spec.ts +++ b/cypress/integration/common/Header.spec.ts @@ -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') }) }) })