From e5a777088168734fd5745f712cff36d2401e03bb Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 15 Feb 2019 16:01:09 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9tabli=20les=20retours=20utilisateurs=20p?= =?UTF-8?q?our=20les=20simulateurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cypress/integration/embauche/embauche.js | 2 +- cypress/integration/embauche/iframe.js | 2 +- .../external/external-integrations.js | 4 ++-- source/components/Feedback/PageFeedback.js | 5 ++-- source/components/Simulation.js | 19 +++++++++++++++ source/components/TargetSelection.js | 10 ++++---- source/règles/externalized.yaml | 2 +- source/selectors/analyseSelectors.js | 2 -- .../layout/Footer/Footer.js | 23 ++++++++++++++----- .../pages/SocialSecurity/SchemeComparaison.js | 2 +- 10 files changed, 48 insertions(+), 23 deletions(-) diff --git a/cypress/integration/embauche/embauche.js b/cypress/integration/embauche/embauche.js index 22a12733f..96a3e80e4 100644 --- a/cypress/integration/embauche/embauche.js +++ b/cypress/integration/embauche/embauche.js @@ -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('/') diff --git a/cypress/integration/embauche/iframe.js b/cypress/integration/embauche/iframe.js index 538189a23..302869e8c 100644 --- a/cypress/integration/embauche/iframe.js +++ b/cypress/integration/embauche/iframe.js @@ -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') }) }) diff --git a/cypress/integration/external/external-integrations.js b/cypress/integration/external/external-integrations.js index 4541fb587..f8e0ca121 100644 --- a/cypress/integration/external/external-integrations.js +++ b/cypress/integration/external/external-integrations.js @@ -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') }) }) diff --git a/source/components/Feedback/PageFeedback.js b/source/components/Feedback/PageFeedback.js index a28581529..5b804d588 100644 --- a/source/components/Feedback/PageFeedback.js +++ b/source/components/Feedback/PageFeedback.js @@ -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, 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) diff --git a/source/components/Simulation.js b/source/components/Simulation.js index b46960a0f..7f55541f7 100644 --- a/source/components/Simulation.js +++ b/source/components/Simulation.js @@ -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 && ( {this.props.targets} )} + + {!noUserInput && !noFeedback && ( + + + Êtes-vous satisfait de ce simulateur ? + + } + customEventName="rate simulator" + /> + + )} + {!noUserInput && this.props.explanation} ) diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index a4c657b04..2b5d181ab 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -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()} - ) } diff --git a/source/règles/externalized.yaml b/source/règles/externalized.yaml index 41c058480..21cfdcbd0 100644 --- a/source/règles/externalized.yaml +++ b/source/règles/externalized.yaml @@ -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: > diff --git a/source/selectors/analyseSelectors.js b/source/selectors/analyseSelectors.js index 84b2e013f..f4c8b10f4 100644 --- a/source/selectors/analyseSelectors.js +++ b/source/selectors/analyseSelectors.js @@ -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) diff --git a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js index cd2d5b075..c4a33b218 100644 --- a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js +++ b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js @@ -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 (
@@ -54,7 +63,9 @@ const Footer = ({ colours: { colour }, tracker, t }) => { /> ))} - + view(lens, sitePaths))} + />