-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: rename form example folder to nested * refactor: replace example with car rental company * test: update e2e for nested form
- Loading branch information
1 parent
2876881
commit 9b37cbb
Showing
14 changed files
with
174 additions
and
243 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,21 @@ | ||
import { expect, test } from '@playwright/test' | ||
|
||
test('Nested Form', async ({ page }) => { | ||
//Open form | ||
await page.goto('http://localhost:3000/') | ||
await page.getByText('plugins', { exact: true }).click() | ||
await page.getByText('form').click() | ||
await page.getByText('nested', { exact: true }).click() | ||
await page.getByText('DemoDataSource/$Nested').click() | ||
|
||
//A nested object | ||
await expect(page.getByText('Owner', { exact: true })).toBeVisible | ||
await page.getByRole('button', { name: 'Open' }).first().click() | ||
await page.getByLabel('Name').fill('Jacob') | ||
await page.getByLabel('Phone Number (optional)').fill('1234') | ||
await page.getByRole('button', { name: 'Submit' }).click() | ||
await page.getByText('self').first().click() | ||
await page.getByRole('button', { name: 'Open' }).first().click() | ||
await expect(page.getByLabel('Name')).toHaveValue('Jacob') | ||
await expect(page.getByLabel('Phone Number (optional)')).toHaveValue('1234') | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
101 changes: 0 additions & 101 deletions
101
example/app/data/DemoDataSource/plugins/form/example/blueprints/FormExample.blueprint.json
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
example/app/data/DemoDataSource/plugins/form/example/formExample.entity.json
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
example/app/data/DemoDataSource/plugins/form/example/nestedExample.entity.json
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
example/app/data/DemoDataSource/plugins/form/nested/blueprints/Car.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,14 @@ | ||
{ | ||
"name": "Car", | ||
"type": "CORE:Blueprint", | ||
"extends": ["CORE:NamedEntity"], | ||
"attributes": [ | ||
{ | ||
"name": "plateNumber", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "number", | ||
"label": "Plate Number", | ||
"optional": false | ||
} | ||
] | ||
} |
52 changes: 52 additions & 0 deletions
52
...le/app/data/DemoDataSource/plugins/form/nested/blueprints/CarRentalCompany.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,52 @@ | ||
{ | ||
"name": "CarRentalCompany", | ||
"type": "CORE:Blueprint", | ||
"attributes": [ | ||
{ | ||
"name": "type", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "string", | ||
"optional": false | ||
}, | ||
{ | ||
"name": "owner", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Person", | ||
"label": "Owner" | ||
}, | ||
{ | ||
"name": "ceo", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Person", | ||
"label": "CEO", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "accountant", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Person", | ||
"label": "Accountant" | ||
}, | ||
{ | ||
"name": "bestCustomer", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Person", | ||
"contained": false, | ||
"optional": true | ||
}, | ||
{ | ||
"name": "cars", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Car", | ||
"dimensions": "*", | ||
"label": "Cars" | ||
}, | ||
{ | ||
"name": "customers", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Customer", | ||
"dimensions": "*", | ||
"label": "Customers" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
example/app/data/DemoDataSource/plugins/form/nested/blueprints/Customer.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,15 @@ | ||
{ | ||
"name": "Customer", | ||
"type": "CORE:Blueprint", | ||
"extends": ["./Person"], | ||
"attributes": [ | ||
{ | ||
"name": "car", | ||
"type": "CORE:BlueprintAttribute", | ||
"attributeType": "./Car", | ||
"label": "Rented Car", | ||
"contained": false, | ||
"optional": true | ||
} | ||
] | ||
} |
24 changes: 9 additions & 15 deletions
24
...e/blueprints/NestedExample.blueprint.json → ...m/nested/blueprints/Person.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
Oops, something went wrong.