1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

test: fix e2e tests + 500 error page

This commit is contained in:
2023-08-01 18:18:16 +02:00
parent 56520830e9
commit e51e3bdc19
6 changed files with 43 additions and 61 deletions

View File

@ -37,15 +37,17 @@ describe('Common > Header', () => {
})
describe('Switch Language', () => {
it('should switch locale from EN (default) to FR', () => {
it('should switch locale from English (default) to French', () => {
cy.get('h1').contains('Théo LUDWIG')
cy.get('[data-cy=locale-flag-text]').contains('EN')
cy.get('[data-cy=locale-flag-text]').contains('English')
cy.get('[data-cy=locales-list]').should('not.be.visible')
cy.get('[data-cy=locale-click]').click()
cy.get('[data-cy=locales-list]').should('be.visible')
cy.get('[data-cy=locales-list] > li:first-child').contains('FR').click()
cy.get('[data-cy=locales-list] > li:first-child')
.contains('French')
.click()
cy.get('[data-cy=locales-list]').should('not.be.visible')
cy.get('[data-cy=locale-flag-text]').contains('FR')
cy.get('[data-cy=locale-flag-text]').contains('French')
cy.get('h1').contains('Théo LUDWIG')
})

View File

@ -1,11 +0,0 @@
describe('Page /500', () => {
beforeEach(() => {
return cy.visit('/500', { failOnStatusCode: false })
})
it('should display the statusCode of 500', () => {
cy.get('[data-cy=status-code]').contains('500')
})
})
export {}