commit
18023057ec
|
@ -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')
|
||||
|
|
|
@ -52,11 +52,17 @@ export class ScrollToElement extends Component {
|
|||
) {
|
||||
return
|
||||
}
|
||||
this.ref.scrollIntoView({
|
||||
behavior: this.props.behavior,
|
||||
block: 'nearest',
|
||||
inline: 'nearest'
|
||||
})
|
||||
try {
|
||||
this.ref.scrollIntoView({
|
||||
behavior: this.props.behavior,
|
||||
block: 'nearest',
|
||||
inline: 'nearest'
|
||||
})
|
||||
} catch (error) {
|
||||
this.ref.scrollIntoView({
|
||||
behavior: this.props.behavior
|
||||
})
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
this.scrollIfNeeded()
|
||||
|
|
|
@ -19,6 +19,7 @@ import computeThemeColours from 'Ui/themeColours'
|
|||
import { simulationTargetNames } from '../config.js'
|
||||
import defaultLang from '../i18n'
|
||||
import inFranceAppReducer from './inFranceAppReducer'
|
||||
import storageReducer from './storageReducer'
|
||||
import type { Action } from 'Types/ActionsTypes'
|
||||
|
||||
// TODO : use context API instead
|
||||
|
@ -160,6 +161,7 @@ const existingCompanyReducer = (state, action) => {
|
|||
}
|
||||
export default reduceReducers(
|
||||
existingCompanyReducer,
|
||||
storageReducer,
|
||||
combineReducers({
|
||||
sessionId: defaultTo(Math.floor(Math.random() * 1000000000000) + ''),
|
||||
// this is handled by redux-form, pas touche !
|
||||
|
|
Loading…
Reference in New Issue