diff --git a/cypress/integration/embauche/embauche.js b/cypress/integration/embauche/embauche.js index 011077d11..38c855da4 100644 --- a/cypress/integration/embauche/embauche.js +++ b/cypress/integration/embauche/embauche.js @@ -20,6 +20,12 @@ describe('Landing basic test', function() { salaryInput('Salaire net').type('2000') cy.get('.distribution-chart__container') }) + it('should allow to navigate to the aid page', function() { + cy.visit('/') + salaryInput('Salaire net').type('2000') + cy.contains("d'aides").click() + cy.contains('Aides employeur') + }) }) describe('Iframe integration test', function() { diff --git a/netlify.toml b/netlify.toml index 4dc1bbc0b..c9664f3aa 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [[redirects]] from = "https://embauche.beta.gouv.fr/stats" -to = "https://remarkable-ogre.glitch.me/" +to = "https://rough-college.glitch.me/" status = 200 [[redirects]] diff --git a/source/components/utils/Scroll.js b/source/components/utils/Scroll.js index f5dcbc161..f0f234b16 100644 --- a/source/components/utils/Scroll.js +++ b/source/components/utils/Scroll.js @@ -17,10 +17,14 @@ export class ScrollToTop extends Component { return } forEachParent(this.ref, elem => (elem.scrollTop = 0)) - window.scroll({ - top: 0, - behavior: this.props.behavior - }) + try { + window.scroll({ + top: 0, + behavior: this.props.behavior + }) + } catch (e) { + window.scroll(0, 0) + } } render() { return (