From 3b9c194e1ac122ecbadc80699c6070c2e6a9c3ff Mon Sep 17 00:00:00 2001 From: Martin Stamm Date: Fri, 9 Feb 2024 13:06:32 +0100 Subject: [PATCH] chore: add failing `choices` tests --- .../condition-on-itself-dropdown-choices.js | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js b/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js index dc326bd..d398fe3 100644 --- a/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js +++ b/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js @@ -31,6 +31,65 @@ export const template = { 'type': 'zeebe:property', 'name': 'method' } + }, + { + 'id': 'valid', + 'label': 'Dropdown', + 'type': 'Dropdown', + 'choices': [ + { + 'value': 'opt1', + 'name':'opt1' + }, + { + 'value': 'opt2', + 'name': 'opt2' + }, + { + 'value': 'opt3', + 'name': 'opt3', + 'condition': { + 'property': 'myId', + 'equals': 'text' + } + } + ], + 'binding': { + 'type': 'zeebe:property', + 'name': 'method' + } + }, + { + 'id': 'validAllMatch', + 'label': 'Dropdown', + 'type': 'Dropdown', + 'choices': [ + { + 'value': 'opt1', + 'name':'opt1' + }, + { + 'value': 'opt2', + 'name': 'opt2' + }, + { + 'value': 'opt3', + 'name': 'opt3', + 'condition': { + 'allMatch': [ + { + 'property': 'myId', + 'equals': 'text' + } + ] + + } + } + ], + 'binding': { + 'type': 'zeebe:property', + 'name': 'method' + } } ] };