|
|
@ -47,6 +47,7 @@ describe('Collection component', () => { |
|
|
type: 'default', |
|
|
type: 'default', |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -66,6 +67,7 @@ describe('Collection component', () => { |
|
|
type: 'default', |
|
|
type: 'default', |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -92,6 +94,7 @@ describe('Collection component', () => { |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -131,6 +134,7 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -138,15 +142,18 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
custom_property: { |
|
|
custom_property: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -206,6 +213,7 @@ describe('Collection component', () => { |
|
|
// @ts-ignore
|
|
|
// @ts-ignore
|
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'age', |
|
|
path: 'age', |
|
|
}); |
|
|
}); |
|
|
expect(firstChild.get('name')).toBe('12'); |
|
|
expect(firstChild.get('name')).toBe('12'); |
|
|
@ -287,6 +295,7 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -296,11 +305,13 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -377,6 +388,7 @@ describe('Collection component', () => { |
|
|
// @ts-ignore
|
|
|
// @ts-ignore
|
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'age', |
|
|
path: 'age', |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
@ -436,6 +448,7 @@ describe('Collection component', () => { |
|
|
value: { |
|
|
value: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -445,12 +458,14 @@ describe('Collection component', () => { |
|
|
value: { |
|
|
value: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -487,17 +502,20 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
custom_prop: { |
|
|
custom_prop: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentIndex, |
|
|
variableType: DataCollectionStateVariableType.currentIndex, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
attributes: { |
|
|
attributes: { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -507,6 +525,7 @@ describe('Collection component', () => { |
|
|
value: { |
|
|
value: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -516,6 +535,7 @@ describe('Collection component', () => { |
|
|
value: { |
|
|
value: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -553,6 +573,7 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentIndex, |
|
|
variableType: DataCollectionStateVariableType.currentIndex, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
@ -574,6 +595,7 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentIndex, |
|
|
variableType: DataCollectionStateVariableType.currentIndex, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
@ -602,6 +624,7 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
@ -611,27 +634,32 @@ describe('Collection component', () => { |
|
|
attribute_trait: { |
|
|
attribute_trait: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
name: { |
|
|
name: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
name: { |
|
|
name: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
custom_prop: { |
|
|
custom_prop: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: 'currentIndex', |
|
|
variableType: 'currentIndex', |
|
|
}, |
|
|
}, |
|
|
property_trait: { |
|
|
property_trait: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
type: 'default', |
|
|
type: 'default', |
|
|
@ -641,27 +669,32 @@ describe('Collection component', () => { |
|
|
attribute_trait: { |
|
|
attribute_trait: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
name: { |
|
|
name: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
name: { |
|
|
name: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
custom_prop: { |
|
|
custom_prop: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: 'currentIndex', |
|
|
variableType: 'currentIndex', |
|
|
}, |
|
|
}, |
|
|
property_trait: { |
|
|
property_trait: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
type: 'default', |
|
|
type: 'default', |
|
|
@ -670,16 +703,19 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
custom_prop: { |
|
|
custom_prop: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: 'currentIndex', |
|
|
variableType: 'currentIndex', |
|
|
}, |
|
|
}, |
|
|
property_trait: { |
|
|
property_trait: { |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
}, |
|
|
}, |
|
|
type: 'default', |
|
|
type: 'default', |
|
|
@ -767,12 +803,14 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
variableType: DataCollectionStateVariableType.currentItem, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
path: 'user', |
|
|
path: 'user', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
collectionConfig: { |
|
|
collectionConfig: { |
|
|
startIndex: 1, |
|
|
startIndex: 1, |
|
|
endIndex: 2, |
|
|
endIndex: 2, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
dataSource: { |
|
|
dataSource: { |
|
|
type: DataVariableType, |
|
|
type: DataVariableType, |
|
|
path: 'my_data_source_id', |
|
|
path: 'my_data_source_id', |
|
|
@ -813,11 +851,13 @@ describe('Collection component', () => { |
|
|
name: { |
|
|
name: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: variableType, |
|
|
variableType: variableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
}, |
|
|
}, |
|
|
attributes: { |
|
|
attributes: { |
|
|
custom_attribute: { |
|
|
custom_attribute: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: variableType, |
|
|
variableType: variableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
traits: [ |
|
|
traits: [ |
|
|
@ -826,6 +866,7 @@ describe('Collection component', () => { |
|
|
value: { |
|
|
value: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: variableType, |
|
|
variableType: variableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
@ -834,6 +875,7 @@ describe('Collection component', () => { |
|
|
value: { |
|
|
value: { |
|
|
type: CollectionVariableType, |
|
|
type: CollectionVariableType, |
|
|
variableType: variableType, |
|
|
variableType: variableType, |
|
|
|
|
|
collectionId: 'my_collection', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
|