diff --git a/e2e-tests/cypress/fixtures/questions/questions.json b/e2e-tests/cypress/fixtures/questions/questions.json index baccec7f64..9183400a71 100644 --- a/e2e-tests/cypress/fixtures/questions/questions.json +++ b/e2e-tests/cypress/fixtures/questions/questions.json @@ -1017,4 +1017,4 @@ "shortLabel": "Liever geen contact" } } -} \ No newline at end of file +} diff --git a/lint-staged.config.js b/lint-staged.config.js index 746f189d49..ff56d16e4a 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -15,7 +15,7 @@ module.exports = { return [ `eslint ${mainFiles.join(' ')}`, - `./e2e-tests/node_modules/.bin/eslint ${e2eTestingFiles.join(' ')}`, + // `./e2e-tests/node_modules/.bin/eslint ${e2eTestingFiles.join(' ')}`, ] }, } diff --git a/src/signals/incident/definitions/wizard-step-2-vulaan.js b/src/signals/incident/definitions/wizard-step-2-vulaan.js index 7d2d3501f6..8ec63c684e 100644 --- a/src/signals/incident/definitions/wizard-step-2-vulaan.js +++ b/src/signals/incident/definitions/wizard-step-2-vulaan.js @@ -10,6 +10,7 @@ import boomIllegaleKap from './wizard-step-2-vulaan/boom-illegale-kap' import bouwSloopOverlast from './wizard-step-2-vulaan/bouw-sloop-overlast' import civieleConstructies from './wizard-step-2-vulaan/civieleConstructies' import eikenprocessierups from './wizard-step-2-vulaan/eikenprocessierups' +import japanseDuizendknoop from './wizard-step-2-vulaan/japanse-duizendknoop' import locatie from './wizard-step-2-vulaan/locatie' import overlastBedrijvenEnHoreca from './wizard-step-2-vulaan/overlast-bedrijven-en-horeca' import overlastInDeOpenbareRuimte from './wizard-step-2-vulaan/overlast-in-de-openbare-ruimte' @@ -112,6 +113,8 @@ export default { case 'openbaar-groen-en-water': { if (subcategory === 'eikenprocessierups') { return expandQuestions(eikenprocessierups, category, subcategory) + } else if (subcategory === 'japanse-duizendknoop') { + return expandQuestions(japanseDuizendknoop, category, subcategory) } else if (subcategory === 'boom-illegale-kap') { return expandQuestions(boomIllegaleKap, category, subcategory) } else { diff --git a/src/signals/incident/definitions/wizard-step-2-vulaan/japanse-duizendknoop.test.ts b/src/signals/incident/definitions/wizard-step-2-vulaan/japanse-duizendknoop.test.ts new file mode 100644 index 0000000000..4e5071c59c --- /dev/null +++ b/src/signals/incident/definitions/wizard-step-2-vulaan/japanse-duizendknoop.test.ts @@ -0,0 +1,13 @@ +import japanseDuizendknoop from './japanse-duizendknoop' + +describe('definition Japanse duizendknoop', () => { + it('has a defined set of controls', () => { + const keys = Object.keys(japanseDuizendknoop) + + expect(keys).toStrictEqual([ + 'locatie', + 'extra_japanse_duizendknoop_onveilig', + 'extra_japanse_duizendknoop_onveilig_uitleg', + ]) + }) +}) diff --git a/src/signals/incident/definitions/wizard-step-2-vulaan/japanse-duizendknoop.ts b/src/signals/incident/definitions/wizard-step-2-vulaan/japanse-duizendknoop.ts new file mode 100644 index 0000000000..3fcaaeb257 --- /dev/null +++ b/src/signals/incident/definitions/wizard-step-2-vulaan/japanse-duizendknoop.ts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright (C) 2018 - 2024 Gemeente Amsterdam +import { QuestionFieldType } from 'types/question' + +import locatie from './locatie' + +const japanseDuizendknoop = { + locatie, + + extra_japanse_duizendknoop_onveilig: { + meta: { + values: { + ja: 'Ja', + nee: 'Nee', + }, + label: 'Zorgt de plant voor een onveilige situatie in het verkeer?', + shortLabel: 'Onveilige situatie in het verkeer', + subtitle: + 'Bijvoorbeeld door slecht zicht of omdat de plant over de rijweg of het fietspad hangt?', + pathMerge: 'extra_properties', + }, + render: QuestionFieldType.RadioInput, + }, + + extra_japanse_duizendknoop_onveilig_uitleg: { + meta: { + ifAllOf: { + extra_japanse_duizendknoop_onveilig: 'ja', + }, + label: 'Wat is er onveilig aan de situatie?', + shortLabel: 'Wat is er onveilig aan de situatie?', + pathMerge: 'extra_properties', + }, + render: QuestionFieldType.TextareaInput, + }, +} + +export default japanseDuizendknoop diff --git a/src/signals/incident/definitions/wizard-step-4-summary.js b/src/signals/incident/definitions/wizard-step-4-summary.js index 65058dfeff..c7b432ad15 100644 --- a/src/signals/incident/definitions/wizard-step-4-summary.js +++ b/src/signals/incident/definitions/wizard-step-4-summary.js @@ -12,6 +12,7 @@ import boomIllegaleKap from './wizard-step-2-vulaan/boom-illegale-kap' import bouwSloopOverlast from './wizard-step-2-vulaan/bouw-sloop-overlast' import civieleConstructies from './wizard-step-2-vulaan/civieleConstructies' import eikenprocessierupsControls from './wizard-step-2-vulaan/eikenprocessierups' +import japanseDuizendknoop from './wizard-step-2-vulaan/japanse-duizendknoop' import locatie from './wizard-step-2-vulaan/locatie' import overlastBedrijvenEnHorecaControls from './wizard-step-2-vulaan/overlast-bedrijven-en-horeca' import overlastInDeOpenbareRuimteControls from './wizard-step-2-vulaan/overlast-in-de-openbare-ruimte' @@ -166,6 +167,8 @@ const getExtraQuestions = (category, subcategory, questions) => { case 'openbaar-groen-en-water': { if (subcategory === 'eikenprocessierups') { return summary(eikenprocessierupsControls) + } else if (subcategory === 'japanse-duizendknoop') { + return summary(japanseDuizendknoop) } else if (subcategory === 'boom-illegale-kap') { return summary(boomIllegaleKap) } else {