Merge pull request #396 from betagouv/fix-aides-link

Ajoute un test pour le lien vers la page d'aide
pull/399/head
Johan Girod 2018-10-11 12:02:03 +02:00 committed by GitHub
commit 82f0cca31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View File

@ -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() {

View File

@ -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]]

View File

@ -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 (