-
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-element-templates#92
- Loading branch information
Showing
6 changed files
with
199 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
49 changes: 49 additions & 0 deletions
49
packages/zeebe-element-templates-json-schema/test/fixtures/placeholder-invalid-property.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,49 @@ | ||
export const template = { | ||
name: 'Tooltip', | ||
id: 'example.com.tooltip', | ||
appliesTo: [ | ||
'bpmn:ServiceTask' | ||
], | ||
properties: [ | ||
{ | ||
label: 'Input with placeholder', | ||
type: 'Boolean', | ||
binding: { | ||
type: 'property', | ||
name: 'prop' | ||
}, | ||
placeholder: 'Invalid input type' | ||
} | ||
] | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
'dataPath': '/properties/0', | ||
'keyword': 'not', | ||
'message': 'should NOT be valid', | ||
'params': {}, | ||
'schemaPath': '#/allOf/1/items/allOf/10/else/not', | ||
}, | ||
{ | ||
'dataPath': '/properties/0', | ||
'keyword': 'if', | ||
'message': 'should match "else" schema', | ||
params: { failingKeyword: 'else' }, | ||
schemaPath: '#/allOf/1/items/allOf/10/if' | ||
}, | ||
{ | ||
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' | ||
} | ||
]; |
49 changes: 49 additions & 0 deletions
49
packages/zeebe-element-templates-json-schema/test/fixtures/placeholder-invalid-type.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,49 @@ | ||
export const template = { | ||
name: 'Tooltip', | ||
id: 'example.com.tooltip', | ||
appliesTo: [ | ||
'bpmn:ServiceTask' | ||
], | ||
properties: [ | ||
{ | ||
label: 'Input with placeholder', | ||
type: 'String', | ||
binding: { | ||
type: 'property', | ||
name: 'prop' | ||
}, | ||
placeholder: [ 'invalid placeholder type' ] | ||
} | ||
] | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
keyword: 'type', | ||
dataPath: '/properties/0/placeholder', | ||
schemaPath: '#/allOf/1/items/allOf/10/then/properties/placeholder/type', | ||
params: { type: 'string' }, | ||
message: 'should be string' | ||
}, | ||
{ | ||
dataPath: '/properties/0', | ||
keyword: 'if', | ||
message: 'should match "then" schema', | ||
params: { failingKeyword: 'then' }, | ||
schemaPath: '#/allOf/1/items/allOf/10/if' | ||
}, | ||
{ | ||
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' | ||
} | ||
]; |
46 changes: 46 additions & 0 deletions
46
packages/zeebe-element-templates-json-schema/test/fixtures/placeholder.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,46 @@ | ||
export const template = { | ||
name: 'Tooltip', | ||
id: 'example.com.tooltip', | ||
appliesTo: [ | ||
'bpmn:ServiceTask' | ||
], | ||
properties: [ | ||
{ | ||
label: 'Input with placeholder', | ||
type: 'String', | ||
binding: { | ||
type: 'property', | ||
name: 'prop' | ||
}, | ||
placeholder: 'This field has a placeholder' | ||
}, | ||
{ | ||
label: 'Input with placeholder', | ||
type: 'Text', | ||
binding: { | ||
type: 'property', | ||
name: 'prop' | ||
}, | ||
placeholder: 'This field has a placeholder' | ||
}, | ||
{ | ||
label: 'Input with placeholder', | ||
type: 'Number', | ||
binding: { | ||
type: 'property', | ||
name: 'prop' | ||
}, | ||
placeholder: 'This field has a placeholder' | ||
}, | ||
{ | ||
label: 'Input with placeholder', | ||
binding: { | ||
type: 'property', | ||
name: 'prop' | ||
}, | ||
placeholder: 'This field has a placeholder' | ||
} | ||
] | ||
}; | ||
|
||
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