Rétabli les retours utilisateurs pour les simulateurs
parent
d9d11dedcd
commit
e5a7770881
|
@ -13,7 +13,7 @@ describe('Landing basic test', function() {
|
|||
})
|
||||
it('should display the simulateur after loading', function() {
|
||||
cy.visit('/')
|
||||
cy.contains('Touché sur le compte bancaire')
|
||||
cy.contains('Versé sur le compte bancaire')
|
||||
})
|
||||
it('should display cotisation repartition when entering net salary', function() {
|
||||
cy.visit('/')
|
||||
|
|
|
@ -3,6 +3,6 @@ describe('Iframe integration test', function() {
|
|||
cy.visit('/integration-test')
|
||||
cy.get('#simulateurEmbauche')
|
||||
.iframe()
|
||||
.contains('Touché sur le compte bancaire')
|
||||
.contains('Versé sur le compte bancaire')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('Pole emploi', function() {
|
|||
cy.visit('https://entreprise.pole-emploi.fr/cout-salarie/')
|
||||
cy.get('#simulateurEmbauche')
|
||||
.iframe()
|
||||
.contains('Touché sur le compte bancaire')
|
||||
.contains('Versé sur le compte bancaire')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -17,6 +17,6 @@ describe('URSSAF', function() {
|
|||
)
|
||||
cy.get('#simulateurEmbauche')
|
||||
.iframe()
|
||||
.contains('Touché sur le compte bancaire')
|
||||
.contains('Versé sur le compte bancaire')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -12,7 +12,6 @@ import type { Tracker } from 'Components/utils/withTracker'
|
|||
import type { Location } from 'react-router-dom'
|
||||
import type { Node } from 'react'
|
||||
|
||||
|
||||
type OwnProps = {
|
||||
blacklist: Array<string>,
|
||||
customMessage?: Node,
|
||||
|
@ -20,7 +19,7 @@ type OwnProps = {
|
|||
}
|
||||
type Props = OwnProps & {
|
||||
location: Location,
|
||||
tracker: Tracker,
|
||||
tracker: Tracker
|
||||
}
|
||||
type State = {
|
||||
showForm: boolean,
|
||||
|
@ -156,5 +155,5 @@ const PageFeedbackWithRouter = ({ location, ...props }) => (
|
|||
export default (compose(
|
||||
withRouter,
|
||||
withTranslation(),
|
||||
withTracker,
|
||||
withTracker
|
||||
)(PageFeedbackWithRouter): React$ComponentType<OwnProps>)
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
/* @flow */
|
||||
|
||||
import { resetSimulation } from 'Actions/actions'
|
||||
import { React, T } from 'Components'
|
||||
import Answers from 'Components/AnswerList'
|
||||
import Conversation from 'Components/conversation/Conversation'
|
||||
import PageFeedback from 'Components/Feedback/PageFeedback'
|
||||
import PeriodSwitch from 'Components/PeriodSwitch'
|
||||
import withColours from 'Components/utils/withColours'
|
||||
import { compose } from 'ramda'
|
||||
import { connect } from 'react-redux'
|
||||
|
@ -41,6 +45,7 @@ export default compose(
|
|||
noUserInput,
|
||||
conversationStarted,
|
||||
resetSimulation,
|
||||
noFeedback,
|
||||
blockingInputControls,
|
||||
showTargetsAnyway,
|
||||
targetsTriggerConversation
|
||||
|
@ -96,6 +101,20 @@ export default compose(
|
|||
{showTargets && (
|
||||
<Animate.fromBottom>{this.props.targets}</Animate.fromBottom>
|
||||
)}
|
||||
|
||||
{!noUserInput && !noFeedback && (
|
||||
<Animate.appear delay={1000}>
|
||||
<PageFeedback
|
||||
customMessage={
|
||||
<T k="feedback.simulator">
|
||||
Êtes-vous satisfait de ce simulateur ?
|
||||
</T>
|
||||
}
|
||||
customEventName="rate simulator"
|
||||
/>
|
||||
</Animate.appear>
|
||||
)}
|
||||
<PeriodSwitch />
|
||||
{!noUserInput && this.props.explanation}
|
||||
</>
|
||||
)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import classNames from 'classnames'
|
||||
import Controls from 'Components/Controls'
|
||||
import InputSuggestions from 'Components/conversation/InputSuggestions'
|
||||
import PeriodSwitch from 'Components/PeriodSwitch'
|
||||
import withColours from 'Components/utils/withColours'
|
||||
import withLanguage from 'Components/utils/withLanguage'
|
||||
import withSitePaths from 'Components/utils/withSitePaths'
|
||||
|
@ -75,14 +74,13 @@ export default compose(
|
|||
style={{
|
||||
color: colours.textColour,
|
||||
background: `linear-gradient(
|
||||
60deg,
|
||||
${colours.darkColour} 0%,
|
||||
${colours.colour} 100%
|
||||
)`
|
||||
60deg,
|
||||
${colours.darkColour} 0%,
|
||||
${colours.colour} 100%
|
||||
)`
|
||||
}}>
|
||||
{this.renderOutputList()}
|
||||
</section>
|
||||
<PeriodSwitch />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -622,7 +622,7 @@ contrat salarié . salaire . net après impôt:
|
|||
titre.fr: Salaire net après impôt
|
||||
titre.en: Net salary after income tax
|
||||
résumé.fr: Revenu disponible du salarié
|
||||
résumé.en: Employee's disposable income
|
||||
résumé.en: Transfered on the bank account
|
||||
question.fr: Quel est le revenu net du salarié après impôt ?
|
||||
question.en: What is the net income of the employee after income tax?
|
||||
description.fr: >
|
||||
|
|
|
@ -242,7 +242,6 @@ let currentMissingVariablesByTargetSelector = createSelector(
|
|||
analysis => collectMissingVariablesByTarget(analysis.targets),
|
||||
analyses
|
||||
)
|
||||
console.log('MV', variables)
|
||||
if (Array.isArray(variables)) {
|
||||
return variables.reduce((acc, next) => mergeDeepWith(add)(acc, next), {})
|
||||
}
|
||||
|
@ -282,7 +281,6 @@ export let currentQuestionSelector = createSelector(
|
|||
state => state.conversationSteps.priorityNamespace
|
||||
],
|
||||
(nextSteps, unfoldedStep, priorityNamespace) =>
|
||||
console.log('nextSteps', nextSteps, 'prio', priorityNamespace) ||
|
||||
unfoldedStep ||
|
||||
(priorityNamespace && nextSteps.find(contains(priorityNamespace))) ||
|
||||
head(nextSteps)
|
||||
|
|
|
@ -4,9 +4,10 @@ import { T } from 'Components'
|
|||
import PageFeedback from 'Components/Feedback/PageFeedback'
|
||||
import LegalNotice from 'Components/LegalNotice'
|
||||
import withColours from 'Components/utils/withColours'
|
||||
import withSitePaths from 'Components/utils/withSitePaths'
|
||||
import withTracker from 'Components/utils/withTracker'
|
||||
import urssafSvg from 'Images/urssaf.svg'
|
||||
import { compose } from 'ramda'
|
||||
import { compose, lensPath, view } from 'ramda'
|
||||
import React, { useState } from 'react'
|
||||
import emoji from 'react-easy-emoji'
|
||||
import Helmet from 'react-helmet'
|
||||
|
@ -14,7 +15,6 @@ import { withTranslation } from 'react-i18next'
|
|||
import SocialIcon from 'Ui/SocialIcon'
|
||||
import i18n from '../../../../i18n'
|
||||
import safeLocalStorage from '../../../../storage/safeLocalStorage'
|
||||
import { feedbackBlacklist } from '../../config'
|
||||
import { hrefLangLink } from '../../sitePaths'
|
||||
import './Footer.css'
|
||||
import betaGouvSvg from './logo-betagouv.svg'
|
||||
|
@ -22,10 +22,18 @@ import Privacy from './Privacy'
|
|||
|
||||
type OwnProps = {}
|
||||
|
||||
const feedbackBlacklist = [
|
||||
['sécuritéSociale', 'indépendant'],
|
||||
['sécuritéSociale', 'auto-entrepreneur'],
|
||||
['sécuritéSociale', 'assimilé-salarié'],
|
||||
['sécuritéSociale', 'salarié']
|
||||
].map(lensPath)
|
||||
|
||||
const LOCAL_STORAGE_KEY = 'app::newsletter::registered'
|
||||
const userAlreadyRegistered: boolean =
|
||||
JSON.parse(safeLocalStorage.getItem(LOCAL_STORAGE_KEY)) || false
|
||||
const Footer = ({ colours: { colour }, tracker, t }) => {
|
||||
|
||||
const Footer = ({ colours: { colour }, tracker, t, sitePaths }) => {
|
||||
const [showNewsletterForm, toggleNewsletterForm] = useState(
|
||||
!userAlreadyRegistered
|
||||
)
|
||||
|
@ -42,6 +50,7 @@ const Footer = ({ colours: { colour }, tracker, t }) => {
|
|||
: '') + window.location.pathname
|
||||
).replace(/\/$/, '')
|
||||
] || []
|
||||
|
||||
return (
|
||||
<div className="footer-container">
|
||||
<Helmet>
|
||||
|
@ -54,7 +63,9 @@ const Footer = ({ colours: { colour }, tracker, t }) => {
|
|||
/>
|
||||
))}
|
||||
</Helmet>
|
||||
<PageFeedback blacklist={feedbackBlacklist} />
|
||||
<PageFeedback
|
||||
blacklist={feedbackBlacklist.map(lens => view(lens, sitePaths))}
|
||||
/>
|
||||
<footer className="footer" style={{ backgroundColor: `${colour}22` }}>
|
||||
<div className="ui__ container">
|
||||
<div id="footerIcons">
|
||||
|
@ -160,8 +171,8 @@ const Footer = ({ colours: { colour }, tracker, t }) => {
|
|||
)
|
||||
}
|
||||
export default (compose(
|
||||
React.memo,
|
||||
withTranslation(),
|
||||
withTracker,
|
||||
withTranslation(),
|
||||
withSitePaths,
|
||||
withColours
|
||||
)(Footer): React$ComponentType<OwnProps>)
|
||||
|
|
|
@ -22,7 +22,7 @@ const SchemeComparaisonPage = () => (
|
|||
<Simulation
|
||||
showTargetsAnyway
|
||||
targets={<ComparativeTargets />}
|
||||
explication={<p />}
|
||||
noFeedback
|
||||
/>
|
||||
</Animate.fromBottom>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue