✅ ajoute des tests E2E pour le changement de langue
parent
644566c804
commit
5ab038bb39
|
@ -43,6 +43,8 @@ jobs:
|
|||
environment:
|
||||
## this enables colors in the output
|
||||
TERM: xterm
|
||||
EN_SITE: '${path}'
|
||||
FR_SITE: '${path}'
|
||||
CYPRESS_baseUrl: http://localhost:5000
|
||||
|
||||
steps:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
globals:
|
||||
cy: false
|
||||
Cypress: false
|
||||
ecmaFeatures:
|
||||
requireConfigFile: false
|
||||
parser: esprima
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
describe('Navigation', function() {
|
||||
const fr = Cypress.env('language') === 'fr'
|
||||
it('should enable switching site language', () => {
|
||||
cy.visit(
|
||||
fr
|
||||
? '/entreprise/devenir-auto-entrepreneur'
|
||||
: '/company/become-auto-entrepreneur'
|
||||
)
|
||||
cy.contains(fr ? 'Switch to English' : 'Passer en français').click()
|
||||
cy.url().should(
|
||||
'include',
|
||||
fr
|
||||
? '/company/become-auto-entrepreneur'
|
||||
: '/entreprise/devenir-auto-entrepreneur'
|
||||
)
|
||||
})
|
||||
})
|
|
@ -72,7 +72,7 @@ const Footer = ({ colours: { colour } }) => {
|
|||
{hrefLang === 'fr' ? (
|
||||
<> Passer en français {emoji('🇫🇷')}</>
|
||||
) : hrefLang === 'en' ? (
|
||||
<> Switch to english {emoji('🇬🇧')}</>
|
||||
<> Switch to English {emoji('🇬🇧')}</>
|
||||
) : (
|
||||
hrefLang
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue