From 24cfebb5d0f4d3b6d71ba579b33490e0e577771f Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Thu, 18 Oct 2018 16:36:30 +0200 Subject: [PATCH] :racehorse: prerender les principales landing pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Acceleration drastique des perfomances, la page est chargée immédiatement. Limitations: - La page embauche.beta.gouv.fr est prérendue en français. Le contenue saute si le navigateur est en anglais - Les tests end to end ne sont pas encore branchés avec les pages prérendues. Voir https://github.com/zeit/serve-handler/issues/71 --- cypress/integration/embauche/embauche.js | 15 - index.html | 5 +- netlify.toml | 46 +- package.json | 5 +- serve.infrance.json | 4 + source/components/ui/index.css | 1 - source/components/utils/Scroll.js | 16 +- source/reducers/rootReducer.js | 2 - .../pages/Company/Find.js | 3 +- source/webpack.common.js | 1 + source/webpack.prod.js | 67 +- yarn.lock | 1542 ++++++++++++++++- 12 files changed, 1650 insertions(+), 57 deletions(-) create mode 100644 serve.infrance.json diff --git a/cypress/integration/embauche/embauche.js b/cypress/integration/embauche/embauche.js index c1cdcfaaf..38c855da4 100644 --- a/cypress/integration/embauche/embauche.js +++ b/cypress/integration/embauche/embauche.js @@ -28,21 +28,6 @@ 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') diff --git a/index.html b/index.html index e9b0c6471..fcdf8c847 100644 --- a/index.html +++ b/index.html @@ -40,6 +40,7 @@ #js { opacity: 0; transform: translateY(20px); + transition: all 0.4s } /* CSS Loader */ @@ -133,9 +134,9 @@
-
- + +