From eba39d1fa1eba9ebc66b5c85167e21bc907d35f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=92=D0=B5=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=B2?= Date: Thu, 2 Jul 2026 09:29:48 +0300 Subject: [PATCH] Validate empty Show On Map options --- src/core/operations/ShowOnMap.mjs | 6 ++++-- tests/operations/tests/ShowOnMap.mjs | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/core/operations/ShowOnMap.mjs b/src/core/operations/ShowOnMap.mjs index 2eab5140..708ad058 100644 --- a/src/core/operations/ShowOnMap.mjs +++ b/src/core/operations/ShowOnMap.mjs @@ -36,7 +36,8 @@ class ShowOnMap extends Operation { { name: "Input Format", type: "option", - value: ["Auto"].concat(FORMATS) + value: ["Auto"].concat(FORMATS), + allowEmpty: false }, { name: "Input Delimiter", @@ -49,7 +50,8 @@ class ShowOnMap extends Operation { "Comma", "Semi-colon", "Colon" - ] + ], + allowEmpty: false } ]; } diff --git a/tests/operations/tests/ShowOnMap.mjs b/tests/operations/tests/ShowOnMap.mjs index 8605ae70..329ed345 100644 --- a/tests/operations/tests/ShowOnMap.mjs +++ b/tests/operations/tests/ShowOnMap.mjs @@ -36,4 +36,26 @@ TestRegister.addTests([ }, ], }, + { + name: "Show on map: empty input format is rejected", + input: "1, 24", + expectedOutput: "Input Format cannot be empty.", + recipeConfig: [ + { + op: "Show on map", + args: [13, "", "Auto"] + }, + ], + }, + { + name: "Show on map: empty input delimiter is rejected", + input: "1, 24", + expectedOutput: "Input Delimiter cannot be empty.", + recipeConfig: [ + { + op: "Show on map", + args: [13, "Auto", ""] + }, + ], + }, ]);