diff --git a/src/components/vmd-commune-or-departement-selector.component.scss b/src/components/vmd-commune-or-departement-selector.component.scss index 862ea6af..fcdb91ab 100644 --- a/src/components/vmd-commune-or-departement-selector.component.scss +++ b/src/components/vmd-commune-or-departement-selector.component.scss @@ -90,6 +90,7 @@ label, -webkit-appearance: none; appearance: none; outline: none; + background-color: -webkit-control-background; &:focus { box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color; @@ -181,4 +182,4 @@ label, .label-for-search { cursor: pointer; -} \ No newline at end of file +} diff --git a/src/utils/Departements.spec.ts b/src/utils/Departements.spec.ts new file mode 100644 index 00000000..87a49051 --- /dev/null +++ b/src/utils/Departements.spec.ts @@ -0,0 +1,20 @@ +import {DEPARTEMENTS_LIMITROPHES} from "./Departements"; + +describe('Departements', () => { + Object.keys(DEPARTEMENTS_LIMITROPHES).forEach(startingDep => { + DEPARTEMENTS_LIMITROPHES[startingDep].forEach(endingDep => { + it(`${startingDep} => ${endingDep} should have bijective adjacent departments`, () => { + // Given + + // When + const endingDepAdjacentDepartments = DEPARTEMENTS_LIMITROPHES[endingDep]; + + // Then + expect(endingDepAdjacentDepartments).toBeDefined() + try { + expect(endingDepAdjacentDepartments.includes(startingDep)).toBeTrue() + }catch(e){ throw new Error(`Missing "${startingDep}" in DEPARTEMENTS_LIMITROPHES["${endingDep}"]`); } + }); + }) + }) +}); diff --git a/src/utils/Departements.ts b/src/utils/Departements.ts index 764b394e..4be14f20 100644 --- a/src/utils/Departements.ts +++ b/src/utils/Departements.ts @@ -8,18 +8,18 @@ export const DEPARTEMENTS_LIMITROPHES: Record { this.viewTemplateResult = viewTemplateResult; }) - RemoteConfig.INSTANCE.sync(); - ServiceWorkers.INSTANCE.startup(); }