Validate empty Show On Map options (#2631)

This commit is contained in:
Kirill 2026-07-03 11:47:06 +03:00 committed by GitHub
parent 3c32e3f64d
commit d6f087efad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 2 deletions

View File

@ -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
}
];
}

View File

@ -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", ""]
},
],
},
]);