From 19f31824f651d46122bb84d4b2f9c7646e2c7554 Mon Sep 17 00:00:00 2001 From: Alexander Harris Date: Fri, 29 Oct 2021 12:27:52 -0700 Subject: [PATCH] fix: updating example goldens to use children property instead of explicit text or string --- .../lib/components/collectionWithBinding.json | 22 +++------ .../lib/components/collectionWithSort.json | 22 +++------ .../componentWithConcatenation.json | 49 ++++++++----------- .../components/componentWithConditional.json | 16 ++---- ...componentWithDataBindingWithPredicate.json | 22 +++------ ...ponentWithDataBindingWithoutPredicate.json | 22 +++------ .../componentWithSimplePropertyBinding.json | 15 ++---- 7 files changed, 61 insertions(+), 107 deletions(-) diff --git a/packages/test-generator/lib/components/collectionWithBinding.json b/packages/test-generator/lib/components/collectionWithBinding.json index c3681718d..73363bc8c 100644 --- a/packages/test-generator/lib/components/collectionWithBinding.json +++ b/packages/test-generator/lib/components/collectionWithBinding.json @@ -66,21 +66,15 @@ "property": "buttonColor", "field": "favoriteColor" } + }, + "children": { + "collectionBindingProperties": { + "property": "buttonUser", + "field": "username" + }, + "defaultValue": "hspain@gmail.com" } - }, - "children": [ - { - "componentType": "Text", - "properties": {}, - "value": { - "collectionBindingProperties": { - "property": "buttonUser", - "field": "username" - }, - "defaultValue": "hspain@gmail.com" - } - } - ] + } } ] } diff --git a/packages/test-generator/lib/components/collectionWithSort.json b/packages/test-generator/lib/components/collectionWithSort.json index 86d8f97ea..298297614 100644 --- a/packages/test-generator/lib/components/collectionWithSort.json +++ b/packages/test-generator/lib/components/collectionWithSort.json @@ -76,21 +76,15 @@ "property": "buttonColor", "field": "favoriteColor" } + }, + "children": { + "collectionBindingProperties": { + "property": "buttonUser", + "field": "username" + }, + "defaultValue": "hspain@gmail.com" } - }, - "children": [ - { - "componentType": "Text", - "properties": {}, - "value": { - "collectionBindingProperties": { - "property": "buttonUser", - "field": "username" - }, - "defaultValue": "hspain@gmail.com" - } - } - ] + } } ] } diff --git a/packages/test-generator/lib/components/componentWithConcatenation.json b/packages/test-generator/lib/components/componentWithConcatenation.json index e31197712..1c62fc698 100644 --- a/packages/test-generator/lib/components/componentWithConcatenation.json +++ b/packages/test-generator/lib/components/componentWithConcatenation.json @@ -10,34 +10,27 @@ } } }, - "properties": {}, - "children": [ - { - "componentType": "String", - "name": "String", - "properties": { - "value": { - "concat": [ - { - "bindingProperties": { - "property": "buttonUser", - "field": "firstName" - }, - "defaultValue": "Harry" - }, - { - "value": " " - }, - { - "bindingProperties": { - "property": "buttonUser", - "field": "lastName" - }, - "defaultValue": "Callahan" - } - ] + "properties": { + "children": { + "concat": [ + { + "bindingProperties": { + "property": "buttonUser", + "field": "firstName" + }, + "defaultValue": "Harry" + }, + { + "value": " " + }, + { + "bindingProperties": { + "property": "buttonUser", + "field": "lastName" + }, + "defaultValue": "Callahan" } - } + ] } - ] + } } diff --git a/packages/test-generator/lib/components/componentWithConditional.json b/packages/test-generator/lib/components/componentWithConditional.json index b6a53bca1..8406e8304 100644 --- a/packages/test-generator/lib/components/componentWithConditional.json +++ b/packages/test-generator/lib/components/componentWithConditional.json @@ -44,17 +44,9 @@ } } } + }, + "children": { + "value": "Conditional Text" } - }, - "children": [ - { - "componentType": "String", - "name": "String", - "properties": { - "value": { - "value": "Conditional Text" - } - } - } - ] + } } diff --git a/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithPredicate.json b/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithPredicate.json index aa91d5154..650914502 100644 --- a/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithPredicate.json +++ b/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithPredicate.json @@ -15,19 +15,13 @@ } } }, - "properties": {}, - "children": [ - { - "componentType": "Text", - "properties": { - "value": { - "bindingProperties": { - "property": "buttonUser", - "field": "firstName" - }, - "defaultValue": "Buddy" - } - } + "properties": { + "children": { + "bindingProperties": { + "property": "buttonUser", + "field": "firstName" + }, + "defaultValue": "Buddy" } - ] + } } diff --git a/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithoutPredicate.json b/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithoutPredicate.json index cb2880853..10e831e38 100644 --- a/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithoutPredicate.json +++ b/packages/test-generator/lib/components/property-binding/componentWithDataBindingWithoutPredicate.json @@ -10,19 +10,13 @@ } } }, - "properties": {}, - "children": [ - { - "componentType": "Text", - "properties": { - "value": { - "bindingProperties": { - "property": "buttonUser", - "field": "firstName" - }, - "defaultValue": "Al" - } - } + "properties": { + "children": { + "bindingProperties": { + "property": "buttonUser", + "field": "firstName" + }, + "defaultValue": "Al" } - ] + } } diff --git a/packages/test-generator/lib/components/property-binding/componentWithSimplePropertyBinding.json b/packages/test-generator/lib/components/property-binding/componentWithSimplePropertyBinding.json index 4c38bd071..f28313624 100644 --- a/packages/test-generator/lib/components/property-binding/componentWithSimplePropertyBinding.json +++ b/packages/test-generator/lib/components/property-binding/componentWithSimplePropertyBinding.json @@ -12,16 +12,9 @@ "bindingProperties": { "property": "isDisabled" } + }, + "children": { + "value": "Simple Property Binding" } - }, - "children": [ - { - "componentType": "Text", - "properties": { - "value": { - "value": "Simple Property Binding" - } - } - } - ] + } }