⬆️ Upgrade to cypress 6

pull/1465/head
Johan Girod 2021-03-24 09:29:16 +01:00
parent 64c7ce7f88
commit 96b4bf8631
9 changed files with 471 additions and 370 deletions

View File

@ -5,5 +5,6 @@
"language": "fr"
},
"integrationFolder": "cypress/integration/mon-entreprise",
"chromeWebSecurity": false
"chromeWebSecurity": false,
"retries": 1
}

View File

@ -0,0 +1 @@
{}

View File

@ -91,7 +91,8 @@ describe('Formulaire demande mobilité', function () {
})
it('should allow to download PDF', () => {
cy.contains(
'Je certifie lexactitude des informations communiquées ci-dessus'
'Je certifie lexactitude des informations communiquées ci-dessus',
{ timeout: 10000 }
).click()
cy.contains('Fait à').click()
cy.focused().type('Plougastel')

View File

@ -12,6 +12,6 @@ describe('Navigation', function () {
it('should go back to home when clicking on logo', () => {
cy.visit('/documentation/contrat-salarié')
cy.get('img[alt^="logo mon-entreprise"]').click()
cy.url().should('be', Cypress.baseUrl)
cy.url().should('match', new RegExp(`${Cypress.config().baseUrl}/?`))
})
})

View File

@ -55,7 +55,7 @@ describe('Simulateurs', function () {
.invoke('val')
.should('match', /1[\s]000/)
if (['indépendant', 'dirigeant-sasu'].includes(simulateur)) {
cy.get(chargeInputSelector).first().invoke('val').should('be', '500')
cy.get(chargeInputSelector).first().invoke('val').should('eq', '500')
}
cy.contains('€/an').click()
})
@ -71,7 +71,7 @@ describe('Simulateurs', function () {
it('should allow to go back to the simulation', function () {
cy.contains('← ').click()
cy.get(inputSelector).first().invoke('val').should('be', '2000')
cy.get(inputSelector).first().invoke('val').should('eq', '2000')
})
})
)
@ -117,7 +117,7 @@ describe('Simulateur salarié mode partagé', () => {
it('should set input value from URL', function () {
cy.visit(urlWithState)
cy.wait(800)
cy.get(brutInputSelector).first().invoke('val').should('be', '1 539')
cy.get(brutInputSelector).first().invoke('val').should('eq', '1539')
cy.contains('Voir mes paramètres').click()
cy.get('span.answerContent').first().contains('CDD')

View File

@ -144,6 +144,12 @@ function FormulairePublicodes() {
const isMissingValues = fields.some(
({ dottedName }) => !isEmpty(engine.evaluate(dottedName).missingVariables)
)
const missingValues = fields
.map(({ dottedName }) => dottedName)
.filter(
(dottedName) => !isEmpty(engine.evaluate(dottedName).missingVariables)
)
return (
<Animate.fromTop key={clearFieldsKey}>
{fields.map(
@ -203,6 +209,7 @@ function FormulairePublicodes() {
<Suspense fallback={null}>
<LazyEndBlock fields={fields} isMissingValues={isMissingValues} />
</Suspense>
{missingValues.join(' / ')}
{!!Object.keys(situation).length && (
<div
css={`

View File

@ -105,7 +105,7 @@
},
"optionalDependencies": {
"bundlesize": "^0.18.0",
"cypress": "^3.6.1",
"cypress": "^6.8.0",
"prerender-spa-plugin": "^3.4.0"
},
"scripts": {

817
yarn.lock

File diff suppressed because it is too large Load Diff