From 6a359c9a93a00f6ea23c33f54c421aea54344692 Mon Sep 17 00:00:00 2001 From: gcarron <gcarron@grandlyon.com> Date: Wed, 3 Feb 2021 15:06:17 +0100 Subject: [PATCH] Fix tests --- src/components/Options/profileTypeOptions.scss | 1 + src/locales/fr.json | 6 ++++-- src/services/profileType.service.spec.ts | 7 ++----- test/__mocks__/profileType.mock.ts | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/Options/profileTypeOptions.scss b/src/components/Options/profileTypeOptions.scss index 441f2bdb2..b8417ce64 100644 --- a/src/components/Options/profileTypeOptions.scss +++ b/src/components/Options/profileTypeOptions.scss @@ -18,6 +18,7 @@ display: flex; flex-wrap: wrap; padding: 0; + margin-top: 0; li { list-style-type: none; margin-right: 0.5rem; diff --git a/src/locales/fr.json b/src/locales/fr.json index 6ee816c5c..86df6f301 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -440,8 +440,10 @@ "title_floor": "Étage", "floor": { "question": "À quel étage est votre appartement ?", - "individual_house": "Maison individuelle", - "appartment": "appartement" + "ground_floor": "RDC", + "intermediate_floor": "Étage intermédiaire", + "last_floor": "Dernier étage", + "not_applicable": "Sans objet" }, "title_heating": "Chauffage", "heating": { diff --git a/src/services/profileType.service.spec.ts b/src/services/profileType.service.spec.ts index 6f16ffbcc..6ec7b7a22 100644 --- a/src/services/profileType.service.spec.ts +++ b/src/services/profileType.service.spec.ts @@ -225,14 +225,11 @@ describe('ProfileType service', () => { nextStep = profileTypeService.getNextFormStep( ProfileTypeStepForm.WARMING_FLUID ) - expect(nextStep).toEqual(ProfileTypeStepForm.INDIVIDUAL_INSULATION_WORK) - nextStep = profileTypeService.getNextFormStep( - ProfileTypeStepForm.INDIVIDUAL_INSULATION_WORK - ) expect(nextStep).toEqual(ProfileTypeStepForm.FACILITIES_INSTALLATION) nextStep = profileTypeService.getNextFormStep( ProfileTypeStepForm.FACILITIES_INSTALLATION ) + expect(nextStep).toEqual(ProfileTypeStepForm.HOT_WATER) nextStep = profileTypeService.getNextFormStep( ProfileTypeStepForm.HOT_WATER @@ -292,7 +289,7 @@ describe('ProfileType service', () => { nextStep = profileTypeService.getPreviousFormStep( ProfileTypeStepForm.FACILITIES_INSTALLATION ) - expect(nextStep).toEqual(ProfileTypeStepForm.INDIVIDUAL_INSULATION_WORK) + expect(nextStep).toEqual(ProfileTypeStepForm.WARMING_FLUID) nextStep = profileTypeService.getPreviousFormStep( ProfileTypeStepForm.HOT_WATER ) diff --git a/test/__mocks__/profileType.mock.ts b/test/__mocks__/profileType.mock.ts index 28419a667..a94d66cde 100644 --- a/test/__mocks__/profileType.mock.ts +++ b/test/__mocks__/profileType.mock.ts @@ -381,24 +381,24 @@ export const mockProfileTypeAnswers: ProfileTypeAnswer[] = [ choices: Object.values(IndividualOrCollective), }, { - type: ProfileTypeFormType.SINGLE_CHOICE, + type: ProfileTypeFormType.MULTI_CHOICE, attribute: 'hotWaterEquipment', choices: Object.values(HotWaterEquipment), }, { type: ProfileTypeFormType.SINGLE_CHOICE, attribute: 'hotWaterFluid', - choices: [FluidType.ELECTRICITY, FluidType.WATER, FluidType.GAS], + choices: [FluidType.ELECTRICITY, FluidType.GAS], }, { type: ProfileTypeFormType.SINGLE_CHOICE, attribute: 'warmingFluid', - choices: [FluidType.ELECTRICITY, FluidType.WATER, FluidType.GAS], + choices: [FluidType.ELECTRICITY, FluidType.GAS], }, { type: ProfileTypeFormType.SINGLE_CHOICE, attribute: 'cookingFluid', - choices: [FluidType.ELECTRICITY, FluidType.WATER, FluidType.GAS], + choices: [FluidType.ELECTRICITY, FluidType.GAS], }, { type: ProfileTypeFormType.SINGLE_CHOICE, -- GitLab