-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refresh test-generator inputs from current golden file tests
- Loading branch information
1 parent
0b6f970
commit 04ab26d
Showing
13 changed files
with
573 additions
and
288 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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
{ | ||
"componentType": "Box", | ||
"id": "I:5", | ||
"properties": { "fontFamily": { "value": "Times New Roman" }, "fontSize": { "value": "20px" } }, | ||
"properties": { | ||
"fontFamily": { | ||
"value": "Times New Roman" | ||
}, | ||
"fontSize": { | ||
"value": "20px" | ||
} | ||
}, | ||
"overrides": {}, | ||
"name": "Test" | ||
} |
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
105 changes: 105 additions & 0 deletions
105
packages/test-generator/lib/components/collectionWithBindingAndSort.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,105 @@ | ||
{ | ||
"id": "1234-5678-9010", | ||
"componentType": "Collection", | ||
"name": "CollectionOfCustomButtons", | ||
"properties": { | ||
"type": { | ||
"value": "list" | ||
}, | ||
"isPaginated": { | ||
"value": true | ||
}, | ||
"gap": { | ||
"value": "1.5rem" | ||
}, | ||
"backgroundColor": { | ||
"bindingProperties": { | ||
"property": "backgroundColor" | ||
} | ||
} | ||
}, | ||
"bindingProperties": { | ||
"width": { | ||
"type": "Number" | ||
}, | ||
"backgroundColor": { | ||
"type": "String" | ||
}, | ||
"buttonColor": { | ||
"type": "Data", | ||
"bindingProperties": { | ||
"model": "UserPreferences", | ||
"predicate": { | ||
"field": "userID", | ||
"operand": "user@email.com", | ||
"operator": "eq" | ||
} | ||
} | ||
} | ||
}, | ||
"collectionProperties": { | ||
"buttonUser": { | ||
"model": "User", | ||
"sort": [ | ||
{ | ||
"field": "firstName", | ||
"direction": "ASC" | ||
}, | ||
{ | ||
"field": "lastName", | ||
"direction": "DESC" | ||
} | ||
], | ||
"predicate": { | ||
"and": [ | ||
{ | ||
"field": "age", | ||
"operand": "10", | ||
"operator": "gt" | ||
}, | ||
{ | ||
"field": "lastName", | ||
"operand": "L", | ||
"operator": "beginsWith" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"children": [ | ||
{ | ||
"componentType": "Flex", | ||
"properties": {}, | ||
"children": [ | ||
{ | ||
"componentType": "Button", | ||
"properties": { | ||
"label": { | ||
"collectionBindingProperties": { | ||
"property": "buttonUser", | ||
"field": "username" | ||
}, | ||
"defaultValue": "hspain@gmail.com" | ||
}, | ||
"labelWidth": { | ||
"bindingProperties": { | ||
"property": "width" | ||
} | ||
}, | ||
"backgroundColor": { | ||
"bindingProperties": { | ||
"property": "buttonColor", | ||
"field": "favoriteColor" | ||
} | ||
}, | ||
"disabled": { | ||
"bindingProperties": { | ||
"property": "isDisabled" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
53 changes: 53 additions & 0 deletions
53
packages/test-generator/lib/components/collectionWithBindingWithoutPredicate.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,53 @@ | ||
{ | ||
"name": "ListingCardCollection", | ||
"children": [ | ||
{ | ||
"children": [], | ||
"name": "ListingCard", | ||
"componentType": "ListingCard", | ||
"properties": { | ||
"marginRight": { | ||
"value": "0" | ||
}, | ||
"marginBottom": { | ||
"value": "0" | ||
}, | ||
"marginTop": { | ||
"value": "0" | ||
}, | ||
"marginLeft": { | ||
"value": "0" | ||
} | ||
}, | ||
"overrides": {}, | ||
"variants": [] | ||
} | ||
], | ||
"id": "c-7m9oAaC8SO0M40Pnvu", | ||
"bindingProperties": {}, | ||
"componentType": "Collection", | ||
"properties": { | ||
"isPaginated": { | ||
"value": "true" | ||
}, | ||
"collectionType": { | ||
"value": "grid" | ||
}, | ||
"type": { | ||
"value": "list" | ||
}, | ||
"columns": { | ||
"value": "2" | ||
}, | ||
"order": { | ||
"value": "left-to-right" | ||
} | ||
}, | ||
"overrides": {}, | ||
"variants": [], | ||
"collectionProperties": { | ||
"bananas": { | ||
"model": "UntitledModel" | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
packages/test-generator/lib/components/collectionWithoutBinding.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,26 @@ | ||
{ | ||
"name": "ListingCardCollection", | ||
"children": [ | ||
{ | ||
"children": [], | ||
"name": "ListingCard", | ||
"componentType": "ListingCard", | ||
"properties": {}, | ||
"overrides": {}, | ||
"variants": [] | ||
} | ||
], | ||
"id": "c-7m9oAaC8SO0M40Pnvu", | ||
"bindingProperties": {}, | ||
"componentType": "Collection", | ||
"properties": { | ||
"type": { | ||
"value": "list" | ||
}, | ||
"isPaginated": { | ||
"value": "true" | ||
} | ||
}, | ||
"overrides": {}, | ||
"variants": [] | ||
} |
110 changes: 110 additions & 0 deletions
110
packages/test-generator/lib/components/componentWithActionNavigation.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,110 @@ | ||
{ | ||
"componentType": "Flex", | ||
"name": "SiteHeader", | ||
"actions": { | ||
"openAmplifyDocs": { | ||
"type": "Navigation.Open", | ||
"parameters": { | ||
"href": "docs.amplify.aws" | ||
} | ||
}, | ||
"redirectToFooter": { | ||
"type": "Navigation.Redirect", | ||
"parameters": { | ||
"href": "#footer-id", | ||
"replaceHistory": true | ||
} | ||
}, | ||
"navigateToFAQPage": { | ||
"type": "Navigation.Redirect", | ||
"parameters": { | ||
"href": "/faq" | ||
} | ||
}, | ||
"reloadPage": { | ||
"type": "Navigation.Refresh" | ||
} | ||
}, | ||
"properties": { | ||
"direction": { | ||
"value": "row" | ||
}, | ||
"justifyContent": { | ||
"value": "space-between" | ||
} | ||
}, | ||
"children": [ | ||
{ | ||
"componentType": "Heading", | ||
"name": "Heading1", | ||
"properties": { | ||
"level": { | ||
"value": 1 | ||
}, | ||
"children": { | ||
"value": "Title" | ||
} | ||
} | ||
}, | ||
{ | ||
"componentType": "Button", | ||
"name": "Button1", | ||
"events": { | ||
"click": "openAmplifyDocs" | ||
}, | ||
"properties": { | ||
"variation": { | ||
"value": "primary" | ||
}, | ||
"children": { | ||
"value": "Open Amplify Docs" | ||
} | ||
} | ||
}, | ||
{ | ||
"componentType": "Button", | ||
"name": "Button2", | ||
"events": { | ||
"click": "navigateToFAQPage" | ||
}, | ||
"properties": { | ||
"variation": { | ||
"value": "primary" | ||
}, | ||
"children": { | ||
"value": "Navigate to FAQ Page" | ||
} | ||
} | ||
}, | ||
{ | ||
"componentType": "Button", | ||
"name": "Button3", | ||
"events": { | ||
"click": "reloadPage" | ||
}, | ||
"properties": { | ||
"variation": { | ||
"value": "primary" | ||
}, | ||
"children": { | ||
"value": "Reload Page" | ||
} | ||
} | ||
}, | ||
{ | ||
"componentType": "Button", | ||
"name": "Button4", | ||
"events": { | ||
"click": "redirectToFooter" | ||
}, | ||
"properties": { | ||
"variation": { | ||
"value": "primary" | ||
}, | ||
"children": { | ||
"value": "Redirect To Footer (No History Update)" | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.