1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-10 13:55:03 +00:00

tests: ajoute un test générique sur l'affichage des questions

This commit is contained in:
Alice Dahan 2025-02-03 12:49:38 +01:00 committed by liliced
parent 189409306d
commit 9cd75c8945

View file

@ -34,6 +34,10 @@ const variableNames = {
fr: 'Cotisations',
en: 'Contributions',
},
question: {
fr: 'Améliorez votre simulation en répondant aux questions',
en: 'Improve your simulation by answering the questions below',
},
}
export const runSimulateurTest = (simulateur: Simulateur) => {
@ -46,6 +50,14 @@ export const runSimulateurTest = (simulateur: Simulateur) => {
cy.get(inputSelector)
})
it('should display questions when entering a value in an input', function () {
cy.contains(variableNames.question[lang]).should('not.exist')
cy.get(inputSelector).first().type('{selectall}1000')
cy.contains(variableNames.question[lang]).should('be.visible')
})
it('should display a result when entering a value in any of the currency input', function () {
cy.contains(variableNames.yearTab[lang]).click()