From 7f7c75ce8fdf5273c30634b1e040c0bb0071cab0 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 17 Oct 2018 13:33:22 +0200 Subject: [PATCH] :white_check_mark: Ajoute un test end to end pour la sauvegarde de la simulation --- cypress/integration/embauche/embauche.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cypress/integration/embauche/embauche.js b/cypress/integration/embauche/embauche.js index 38c855da4..c1cdcfaaf 100644 --- a/cypress/integration/embauche/embauche.js +++ b/cypress/integration/embauche/embauche.js @@ -28,6 +28,21 @@ describe('Landing basic test', function() { }) }) +describe('Simulation saving test', function() { + it('should save the current simulation', async function() { + cy.visit('/') + salaryInput('Salaire net').type('5471') + cy.tick(500) + cy.contains('Autres').click() + cy.contains('passer').click() + cy.contains('passer').click() + cy.tick(2000).then(() => this.clock.restore) + cy.visit('/') + cy.contains('Retrouver ma simulation').click() + salaryInput('Salaire net').should('have.value', '5471') + }) +}) + describe('Iframe integration test', function() { it('should display an iframe of the simulateur', function() { cy.visit('/integration-test')