Skip to content

Commit

Permalink
chore: link JSON schema to test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer committed Oct 31, 2023
1 parent cd07d2d commit d806b37
Show file tree
Hide file tree
Showing 46 changed files with 52 additions and 32 deletions.
1 change: 1 addition & 0 deletions e2e/visual/fixtures/empty.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../packages/form-json-schema/resources/schema.json",
"schemaVersion": 8,
"exporter": {
"name": "Camunda Web Modeler",
Expand Down
3 changes: 1 addition & 2 deletions e2e/visual/fixtures/form.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../packages/form-json-schema/resources/schema.json",
"components": [
{
"key": "creditor",
Expand Down Expand Up @@ -132,13 +133,11 @@
"type": "image"
},
{
"key": "submit",
"label": "Submit",
"type": "button"
},
{
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions e2e/visual/fixtures/groups.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../packages/form-json-schema/resources/schema.json",
"schemaVersion": 11,
"exporter": {
"name": "Camunda Web Modeler",
Expand Down
9 changes: 4 additions & 5 deletions packages/form-js-carbon-styles/test/spec/complex.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"text": "# Title 1\n## Title 2\n### Title 3\n#### Title 4\n##### Title 5\n###### Title 6\n\n[this is a link](https://camunda.com) and then comes [**another bold link**](https://bpmn.io) and then [_another italic link_](https://camunda.com)\n\n- list\n- list\n\n1. foo\n2. foo\n\nFoo _italic_ **bold**\n\n> Multiline code\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus auctor sodales pretium. Donec id volutpat quam, sit amet elementum lectus. \n\nInline `code`\n\n```\nMultiline code\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus auctor sodales pretium. Donec id volutpat quam, sit amet elementum lectus. \n```\n\n[Link](https://camunda.com)\n",
Expand Down Expand Up @@ -60,7 +61,7 @@
"label": "I am a read only textfield",
"type": "textfield",
"id": "Field_1r9b6p3",
"key": "readonly-textfield",
"key": "readonly_textfield",
"description": "I am a read only textfield description",
"readonly": true,
"defaultValue": "value"
Expand Down Expand Up @@ -613,15 +614,13 @@
"action": "reset",
"label": "reset",
"type": "button",
"id": "Field_1ydujqw",
"key": "field_1yi6q4r"
"id": "Field_1ydujqw"
},
{
"action": "submit",
"label": "submit",
"type": "button",
"id": "Field_1ydujqa",
"key": "field_1yi6q4a"
"id": "Field_1ydujqa"
}
],
"type": "default",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-editor/test/spec/complex.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "columns",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../../form-json-schema/resources/schema.json",
"components": [
{
"id": "Textfield_1",
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js-editor/test/spec/defaultValues.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand Down Expand Up @@ -83,13 +84,11 @@
]
},
{
"key": "submit",
"label": "Submit",
"type": "button"
},
{
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ describe('properties panel', function() {
it('entries', function() {

// given
const field = schema.components.find(({ key }) => key === 'submit');
const field = schema.components.find(({ action }) => action === 'submit');

const result = createPropertiesPanel({
container,
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js-editor/test/spec/form-no-ids.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand Down Expand Up @@ -147,14 +148,12 @@
]
},
{
"key": "submit",
"action": "submit",
"label": "Submit",
"type": "button"
},
{
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-editor/test/spec/form-rows.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"id": "Textfield_1",
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js-editor/test/spec/form.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"id": "Form_1",
"type": "default",
"components": [
Expand Down Expand Up @@ -209,14 +210,12 @@
{
"id": "Button_1",
"action": "submit",
"key": "submit",
"label": "Submit",
"type": "button"
},
{
"id": "Button_2",
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/form-js-editor/test/spec/other.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand All @@ -22,7 +23,6 @@
}
},
{
"key": "submit",
"label": "Submit",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-editor/test/spec/redundantValues.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "redundantValues",
Expand Down
2 changes: 2 additions & 0 deletions packages/form-js-playground/test/spec/form.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand Down Expand Up @@ -55,6 +56,7 @@
},
{
"type": "select",
"key": "selectMe",
"label": "Select me",
"valuesExpression": "=if isGood then [ \"good\" ] else [\"bad\"]"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/form-js-playground/test/spec/other-form.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"action": "reset",
"id": "foo",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-playground/test/spec/rows-form.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "invoiceNumber",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/appearance.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "textfield",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/complex-conditions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"label": "Complex display condition 1",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/condition-errors.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"label": "Checkbox",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "amount",
Expand All @@ -14,6 +15,7 @@
},
{
"label": "Text Field",
"key": "textfield",
"type": "textfield",
"id": "Field",
"conditional": {
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/condition.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "amount",
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js-viewer/test/spec/defaultValues.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand Down Expand Up @@ -154,13 +155,11 @@
]
},
{
"key": "submit",
"label": "Submit",
"type": "button"
},
{
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/descriptions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "textfield",
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js-viewer/test/spec/disabled.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"disabled": true,
Expand Down Expand Up @@ -39,13 +40,11 @@
"type": "textarea"
},
{
"key": "submit",
"label": "Submit",
"type": "button"
},
{
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/dynamic.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "product",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"label": "An image",
"source": "=logo",
"type": "image"
},
{
"label": "An image with alt text",
"alt": "=alt",
"type": "image"
},
{
"label": "Another image",
"alt": "This is just an image",
"type": "image"
},
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/focusables.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"label": "Number",
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js-viewer/test/spec/form.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand Down Expand Up @@ -137,13 +138,11 @@
"type": "image"
},
{
"key": "submit",
"label": "Submit",
"type": "button"
},
{
"action": "reset",
"key": "reset",
"label": "Reset",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/groups.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "text_root",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"label": "a",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"label": "a",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/images.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"source": "=logo_expression",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/labels.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "textfield",
Expand Down
2 changes: 1 addition & 1 deletion packages/form-js-viewer/test/spec/other.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"type": "text",
Expand All @@ -22,7 +23,6 @@
}
},
{
"key": "submit",
"label": "Submit",
"type": "button"
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/readonly-expression.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"key": "amount",
Expand Down
1 change: 1 addition & 0 deletions packages/form-js-viewer/test/spec/rows.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../../form-json-schema/resources/schema.json",
"components": [
{
"id": "Textfield_1",
Expand Down
Loading

0 comments on commit d806b37

Please sign in to comment.