From 3c87d34caba9899835498a1b69ebf8d2bf118716 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Thu, 21 Apr 2022 17:28:10 +0200 Subject: [PATCH] Corrige les tests sur master --- .../integration/mon-entreprise/simulateur-dividendes.js | 4 ---- site/source/components/conversation/RuleInput.tsx | 1 - site/source/pages/Simulateurs/Indépendant.tsx | 1 + site/source/selectors/simulationSelectors.ts | 7 ++++++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/site/cypress/integration/mon-entreprise/simulateur-dividendes.js b/site/cypress/integration/mon-entreprise/simulateur-dividendes.js index fb360d58d..3c7694a02 100644 --- a/site/cypress/integration/mon-entreprise/simulateur-dividendes.js +++ b/site/cypress/integration/mon-entreprise/simulateur-dividendes.js @@ -14,8 +14,4 @@ describe('Simulateur dividendes', function () { cy.contains(/[cC]otisations\s+17,2\s*%/) cy.contains(/[Ii]mpôt\s+12,8\s*%/) }) - - it('should allow switching PFU with barème', function () { - cy.get('div [role="radiogroup"] input').eq(0).should('not.be.checked') - }) }) diff --git a/site/source/components/conversation/RuleInput.tsx b/site/source/components/conversation/RuleInput.tsx index f2a3e1778..e7570c5f2 100644 --- a/site/source/components/conversation/RuleInput.tsx +++ b/site/source/components/conversation/RuleInput.tsx @@ -98,7 +98,6 @@ export default function RuleInput({ ...props, } const meta = getMeta<{ affichage?: string }>(rule.rawNode, {}) - if (getVariant(engine.getRule(dottedName))) { const type = inputType ?? diff --git a/site/source/pages/Simulateurs/Indépendant.tsx b/site/source/pages/Simulateurs/Indépendant.tsx index edb958a7c..b0b91e0c9 100644 --- a/site/source/pages/Simulateurs/Indépendant.tsx +++ b/site/source/pages/Simulateurs/Indépendant.tsx @@ -56,6 +56,7 @@ export default function IndépendantSimulation() { <> { dispatch( diff --git a/site/source/selectors/simulationSelectors.ts b/site/source/selectors/simulationSelectors.ts index 35d6a0b98..57f25cb20 100644 --- a/site/source/selectors/simulationSelectors.ts +++ b/site/source/selectors/simulationSelectors.ts @@ -31,7 +31,12 @@ export const companySituationSelector = (state: RootState) => export const firstStepCompletedSelector = (state: RootState) => { const situation = situationSelector(state) - return Object.keys(situation).length > 0 + return ( + Object.keys(situation).filter( + // Hack to prevent questions from showing after selection 'IR or IS' in the toggle above simulator + (dottedName) => dottedName !== 'entreprise . imposition' + ).length > 0 + ) } export const targetUnitSelector = (state: RootState) =>