test(site): Ajoute un test e2e des mentions légales et politique de confidentialité

pull/3047/head
Alice Dahan 2024-07-23 17:33:30 +02:00 committed by liliced
parent d8db3dbf8b
commit 7e04853a46
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
import { fr } from '../../support/utils'
describe('Footer', function () {
if (!fr) {
return
}
it('should contain a legal notice link', function () {
cy.visit('/')
cy.contains('footer button', 'Mentions légales').should('be.visible')
})
it('should display the legal notice on click', function () {
cy.visit('/')
cy.contains('footer button', 'Mentions légales').click()
cy.get('div[data-cy="modal"]')
.should('be.visible')
.and('include.text', 'Mentions légales')
})
it('should contain a privacy policy link', function () {
cy.visit('/')
cy.contains('footer button', 'Politique de confidentialité').should(
'be.visible'
)
})
it('should display the privacy policy on click', function () {
cy.visit('/')
cy.contains('footer button', 'Politique de confidentialité').click()
cy.get('div[data-cy="modal"]')
.should('be.visible')
.and('include.text', 'Politique de confidentialité')
})
})