-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
related to bpmn-io/bpmn-js-properties-panel#606
- Loading branch information
1 parent
b015a59
commit ac43f50
Showing
6 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
packages/zeebe-element-templates-json-schema/test/fixtures/feel-type-mismatch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
export const template = { | ||
'name': 'Pattern Template', | ||
'id': 'com.example.PatternTemplate', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'properties': [ | ||
{ | ||
'label': 'Feel (Boolean)', | ||
'type': 'Boolean', | ||
'binding': { | ||
'type': 'property', | ||
'name': 'prop' | ||
}, | ||
'feel': 'required' | ||
} | ||
] | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
keyword: 'errorMessage', | ||
dataPath: '/properties/0', | ||
schemaPath: '#/definitions/properties/allOf/0/items/allOf/1/then/errorMessage', | ||
params: { | ||
errors: [ | ||
{ | ||
dataPath: '/properties/0', | ||
emUsed: true, | ||
keyword: 'not', | ||
message: 'should NOT be valid', | ||
params: {}, | ||
schemaPath: '#/definitions/properties/allOf/0/items/allOf/1/then/not' | ||
} | ||
] | ||
}, | ||
message: 'feel is only valid for "String" and "Text" type' | ||
}, | ||
{ | ||
keyword: 'if', | ||
dataPath: '/properties/0', | ||
schemaPath: '#/definitions/properties/allOf/0/items/allOf/1/if', | ||
params: { failingKeyword: 'then' }, | ||
message: 'should match "then" schema' | ||
}, | ||
{ | ||
keyword: 'type', | ||
dataPath: '', | ||
schemaPath: '#/oneOf/1/type', | ||
params: { type: 'array' }, | ||
message: 'should be array' | ||
}, | ||
{ | ||
keyword: 'oneOf', | ||
dataPath: '', | ||
schemaPath: '#/oneOf', | ||
params: { passingSchemas: null }, | ||
message: 'should match exactly one schema in oneOf' | ||
} | ||
]; |
47 changes: 47 additions & 0 deletions
47
packages/zeebe-element-templates-json-schema/test/fixtures/feel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export const template = { | ||
'name': 'Pattern Template', | ||
'id': 'com.example.PatternTemplate', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'properties': [ | ||
{ | ||
'label': 'Feel Required (String)', | ||
'type': 'String', | ||
'binding': { | ||
'type': 'property', | ||
'name': 'prop' | ||
}, | ||
'feel': 'required' | ||
}, | ||
{ | ||
'label': 'Feel Optional (String)', | ||
'type': 'String', | ||
'binding': { | ||
'type': 'property', | ||
'name': 'prop' | ||
}, | ||
'feel': 'optional' | ||
}, | ||
{ | ||
'label': 'Feel Required (Text)', | ||
'type': 'Text', | ||
'binding': { | ||
'type': 'property', | ||
'name': 'prop' | ||
}, | ||
'feel': 'required' | ||
}, | ||
{ | ||
'label': 'Feel Optional (Text)', | ||
'type': 'Text', | ||
'binding': { | ||
'type': 'property', | ||
'name': 'prop' | ||
}, | ||
'feel': 'optional' | ||
} | ||
] | ||
}; | ||
|
||
export const errors = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters