diff --git a/frontend/src/models/HousingFilters.tsx b/frontend/src/models/HousingFilters.tsx index 50737ba5e..d2bce007f 100644 --- a/frontend/src/models/HousingFilters.tsx +++ b/frontend/src/models/HousingFilters.tsx @@ -263,6 +263,11 @@ export const localityKindsOptions: SelectOption[] = [ ]; export const dataFileYearsIncludedOptions: SelectOption[] = [ + { + value: 'ff-2023', + label: 'Fichiers fonciers 2023', + badgeLabel: 'Fichiers fonciers 2023 inclus' + }, { value: 'lovac-2019', label: 'ZLV 2019 (>2 ans)', @@ -296,6 +301,11 @@ export const dataFileYearsIncludedOptions: SelectOption[] = [ ].sort((optionA, optionB) => optionB.value.localeCompare(optionA.value)); export const dataFileYearsExcludedOptions: SelectOption[] = [ + { + value: 'ff-2023', + label: 'Fichiers fonciers 2023', + badgeLabel: 'Fichiers fonciers 2023 exclus' + }, { value: 'lovac-2019', label: 'ZLV 2019 (>2 ans)', diff --git a/server/src/test/testFixtures.ts b/server/src/test/testFixtures.ts index ccc5d4280..17de4ea44 100644 --- a/server/src/test/testFixtures.ts +++ b/server/src/test/testFixtures.ts @@ -287,13 +287,21 @@ export const genHousingApi = ( const department = geoCode.substring(0, 2); const locality = geoCode.substring(2, 5); const invariant = genInvariant(locality); - const dataYears = faker.helpers - .arrayElements(fp.range(2019, new Date().getUTCFullYear() + 1), { + const dataYears = faker.helpers.arrayElements( + fp.range(2019, new Date().getUTCFullYear() + 1), + { min: 1, max: new Date().getUTCFullYear() + 1 - 2019 - }) + } + ); + const dataFileYears = dataYears + .map((year) => `lovac-${year}`) + .concat( + faker.helpers.maybe(() => 'ff-2023', { + probability: 0.2 + }) ?? [] + ) .toSorted(); - const dataFileYears = dataYears.map((year) => `lovac-${year}`); return { id,