💚 répare les tests E2E
parent
abf998c762
commit
c8e7013255
|
@ -13,7 +13,7 @@ describe('Landing basic test', function() {
|
|||
})
|
||||
it('should display the simulateur after loading', function() {
|
||||
cy.visit('/')
|
||||
cy.contains('Touché par le salarié')
|
||||
cy.contains('Touché sur le compte bancaire')
|
||||
})
|
||||
it('should display cotisation repartition when entering net salary', function() {
|
||||
cy.visit('/')
|
||||
|
@ -23,8 +23,10 @@ describe('Landing basic test', function() {
|
|||
it('should allow to navigate to a documentation page', function() {
|
||||
cy.visit('/')
|
||||
salaryInput('Salaire net').type('2000')
|
||||
cy.contains("Total chargé").click()
|
||||
cy.contains(`C'est le total que l'employeur doit verser pour employer un salarié`)
|
||||
cy.contains('Total chargé').click()
|
||||
cy.contains(
|
||||
`C'est le total que l'employeur doit verser pour employer un salarié`
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -32,7 +34,7 @@ describe('Simulation saving test', function() {
|
|||
it('should save the current simulation', function() {
|
||||
cy.visit('/')
|
||||
salaryInput('Salaire net').type('5471')
|
||||
cy.contains('Autres').click()
|
||||
cy.contains('CDD').click()
|
||||
cy.contains('passer').click()
|
||||
cy.contains('passer').click()
|
||||
// Wanted to use cypress.clock(), but can't because of piwik changing Date prototype (!)
|
||||
|
|
|
@ -7,6 +7,6 @@ describe('Pole emploi test', function() {
|
|||
cy.reload(true)
|
||||
cy.get('#simulateurEmbauche')
|
||||
.iframe()
|
||||
.contains('Touché par le salarié')
|
||||
.contains('Touché sur le compte bancaire')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -3,6 +3,6 @@ describe('Iframe integration test', function() {
|
|||
cy.visit('/integration-test')
|
||||
cy.get('#simulateurEmbauche')
|
||||
.iframe()
|
||||
.contains('Touché par le salarié')
|
||||
.contains('Touché sur le compte bancaire')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -17,14 +17,17 @@ import {
|
|||
analysisWithDefaultsSelector,
|
||||
blockingInputControlsSelector,
|
||||
flatRulesSelector,
|
||||
nextStepsSelector,
|
||||
noUserInputSelector
|
||||
} from 'Selectors/analyseSelectors'
|
||||
import Animate from 'Ui/animate'
|
||||
import AnimatedTargetValue from 'Ui/AnimatedTargetValue'
|
||||
import { Progress } from '../sites/mycompanyinfrance.fr/layout/ProgressHeader/ProgressHeader'
|
||||
import CurrencyInput from './CurrencyInput/CurrencyInput'
|
||||
import QuickLinks from './QuickLinks'
|
||||
import './TargetSelection.css'
|
||||
|
||||
const MAX_NUMBER_QUESTION = 18
|
||||
export default compose(
|
||||
translate(),
|
||||
withColours,
|
||||
|
@ -40,6 +43,9 @@ export default compose(
|
|||
analysis: analysisWithDefaultsSelector(state),
|
||||
blockingInputControls: blockingInputControlsSelector(state),
|
||||
flatRules: flatRulesSelector(state),
|
||||
progress:
|
||||
(100 * (MAX_NUMBER_QUESTION - nextStepsSelector(state))) /
|
||||
MAX_NUMBER_QUESTION,
|
||||
noUserInput: noUserInputSelector(state),
|
||||
conversationStarted: state.conversationStarted,
|
||||
activeInput: state.activeTargetInput,
|
||||
|
@ -55,12 +61,13 @@ export default compose(
|
|||
)(
|
||||
class TargetSelection extends Component {
|
||||
render() {
|
||||
let { colours, analysis } = this.props
|
||||
let { colours, analysis, progress } = this.props
|
||||
|
||||
return (
|
||||
<div id="targetSelection">
|
||||
<QuickLinks />
|
||||
<Controls controls={analysis.controls} />
|
||||
<div style={{height: '10px'}}><Progress percent={progress}/></div>
|
||||
<section
|
||||
className="ui__ plain card"
|
||||
style={{
|
||||
|
|
|
@ -44,7 +44,7 @@ const companyProgressSelector = createSelector(
|
|||
const NUMBER_MAX_QUESTION_SIMULATION = 18
|
||||
const START_SIMULATION_COEFFICIENT = 0.15
|
||||
const QUESTIONS_COEFFICIENT = 0.85
|
||||
const estimationProgressSelector = state => {
|
||||
export const estimationProgressSelector = state => {
|
||||
const userInputProgress = +(
|
||||
!noUserInputSelector(state) &&
|
||||
!softCatch(blockingInputControlsSelector)(state)
|
||||
|
|
|
@ -6,8 +6,8 @@ import withTracker from 'Components/utils/withTracker'
|
|||
import { compose } from 'ramda'
|
||||
import { withNamespaces } from 'react-i18next'
|
||||
import { connect } from 'react-redux'
|
||||
import { withRouter } from 'react-router'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { withRouter } from "react-router";
|
||||
import selectors from 'Selectors/progressSelectors'
|
||||
import companySvg from '../../images/company.svg'
|
||||
import estimateSvg from '../../images/estimate.svg'
|
||||
|
@ -16,7 +16,7 @@ import './ProgressHeader.css'
|
|||
|
||||
import type { Tracker } from 'Components/utils/withTracker'
|
||||
|
||||
const Progress = ({ percent }) => (
|
||||
export const Progress = ({ percent }: { percent: number }) => (
|
||||
<div className="progress">
|
||||
<div
|
||||
className="bar"
|
||||
|
@ -25,7 +25,6 @@ const Progress = ({ percent }) => (
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
)
|
||||
type OwnProps = {}
|
||||
type Props = OwnProps & {
|
||||
|
@ -91,7 +90,7 @@ export default (compose(
|
|||
connect(
|
||||
selectors,
|
||||
{}
|
||||
),
|
||||
),
|
||||
withRouter,
|
||||
withNamespaces(),
|
||||
withSitePaths
|
||||
|
|
Loading…
Reference in New Issue