-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/job-ui
- Loading branch information
Showing
18 changed files
with
345 additions
and
176 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { expect, test } from '@playwright/test' | ||
|
||
test('Read only primitives', async ({ page }) => { | ||
await page.goto('http://localhost:3000/') | ||
await page.getByText('plugins', { exact: true }).click() | ||
await page.getByText('form').click() | ||
await page.getByText('read_only_primitives').click() | ||
await page.getByText('ReadOnlyPrimitives').click() | ||
|
||
await expect(page.getByLabel('A required string')).not.toBeEditable() | ||
|
||
await expect( | ||
page.getByLabel('An optional string (optional)') | ||
).not.toBeEditable() | ||
|
||
await expect(page.getByLabel('A required number')).not.toBeEditable() | ||
|
||
await expect(page.getByLabel('Numbers only (optional)')).not.toBeEditable() | ||
|
||
await expect(page.getByLabel('Integer only (optional)')).not.toBeEditable() | ||
|
||
await expect( | ||
page.getByLabel('An optional checkbox (optional)') | ||
).not.toBeEditable() | ||
|
||
await expect( | ||
page.getByLabel('A required checbox (e.g. for confirmation purposes)') | ||
).not.toBeEditable() | ||
}) |
65 changes: 65 additions & 0 deletions
65
...DataSource/plugins/form/read_only_primitives/blueprints/ReadOnlyPrimitives.blueprint.json
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,65 @@ | ||
{ | ||
"name": "ReadOnlyPrimitives", | ||
"type": "CORE:Blueprint", | ||
"attributes": [ | ||
{ | ||
"name": "type", | ||
"type": "dmss://system/SIMOS/BlueprintAttribute", | ||
"attributeType": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "dmss://system/SIMOS/BlueprintAttribute", | ||
"attributeType": "string" | ||
}, | ||
{ | ||
"name": "stringOptional", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "string", | ||
"label": "An optional string", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "stringRequired", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "string", | ||
"label": "A required string", | ||
"optional": false | ||
}, | ||
{ | ||
"name": "numberRequired", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "number", | ||
"label": "A required number", | ||
"optional": false | ||
}, | ||
{ | ||
"name": "numberOptional", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "number", | ||
"label": "Numbers only", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "integer", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "integer", | ||
"label": "Integer only", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "checkboxOptional", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "boolean", | ||
"label": "An optional checkbox", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "checkboxRequired", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "boolean", | ||
"label": "A required checbox (e.g. for confirmation purposes)", | ||
"optional": false | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
.../app/data/DemoDataSource/plugins/form/read_only_primitives/readOnlyPrimitives.entity.json
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,12 @@ | ||
{ | ||
"_id": "readOnlyPrimitives", | ||
"name": "ReadOnlyPrimitives", | ||
"type": "./blueprints/ReadOnlyPrimitives", | ||
"stringRequired": "A required string", | ||
"stringOptional": "an optional string", | ||
"numberRequired": 2.34, | ||
"numberOptional": 3.14, | ||
"integer": 30, | ||
"checkboxOptional": false, | ||
"checkboxRequired": true | ||
} |
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
44 changes: 44 additions & 0 deletions
44
...a/DemoDataSource/recipes/plugins/form/read_only_primitives/readOnlyPrimitives.recipe.json
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,44 @@ | ||
{ | ||
"type": "CORE:RecipeLink", | ||
"_blueprintPath_": "/plugins/form/read_only_primitives/blueprints/ReadOnlyPrimitives", | ||
"initialUiRecipe": { | ||
"name": "ViewSelector", | ||
"type": "CORE:UiRecipe", | ||
"plugin": "@development-framework/dm-core-plugins/view_selector", | ||
"config": { | ||
"type": "PLUGINS:dm-core-plugins/view_selector/ViewSelectorConfig", | ||
"childTabsOnRender": true, | ||
"asSidebar": false, | ||
"items": [ | ||
{ | ||
"type": "PLUGINS:dm-core-plugins/view_selector/ViewSelectorItem", | ||
"view": { | ||
"type": "CORE:ReferenceViewConfig", | ||
"recipe": "ReadOnly" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"uiRecipes": [ | ||
{ | ||
"name": "ReadOnly", | ||
"type": "CORE:UiRecipe", | ||
"plugin": "@development-framework/dm-core-plugins/form", | ||
"category": "edit", | ||
"config": { | ||
"type": "PLUGINS:dm-core-plugins/form/FormInput", | ||
"fields": [ | ||
"stringRequired", | ||
"stringOptional", | ||
"numberRequired", | ||
"numberOptional", | ||
"integer", | ||
"checkboxOptional", | ||
"checkboxRequired" | ||
], | ||
"readOnly": true | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
dm-cli==1.1.0 | ||
dm-cli==1.1.1 |
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
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
Oops, something went wrong.