From d6f087efadbb07517ea235b7a7185e80e9de032a Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 3 Jul 2026 11:47:06 +0300 Subject: [PATCH] Validate empty Show On Map options (#2631) --- 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", ""] + }, + ], + }, ]);