Skip to content

Commit 697c11a

Browse files
Udpate tests for Diffirent Collection variable types
1 parent b7d2793 commit 697c11a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts

+26
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,29 @@ describe('Collection component', () => {
590590
type: CollectionVariableType,
591591
variable_type: variableType,
592592
},
593+
attributes: {
594+
custom_attribute: {
595+
type: CollectionVariableType,
596+
variable_type: variableType,
597+
},
598+
},
599+
traits: [
600+
{
601+
name: 'attribute_trait',
602+
value: {
603+
type: CollectionVariableType,
604+
variable_type: variableType,
605+
},
606+
},
607+
{
608+
name: 'property_trait',
609+
changeProp: true,
610+
value: {
611+
type: CollectionVariableType,
612+
variable_type: variableType,
613+
},
614+
},
615+
],
593616
},
594617
config: {
595618
dataSource: {
@@ -605,6 +628,9 @@ describe('Collection component', () => {
605628

606629
children.each((child, index) => {
607630
expect(child.get('content')).toBe(expectedValues[index]);
631+
expect(child.get('property_trait')).toBe(expectedValues[index]);
632+
expect(child.getAttributes()['custom_attribute']).toBe(expectedValues[index]);
633+
expect(child.getAttributes()['attribute_trait']).toBe(expectedValues[index]);
608634
});
609635
});
610636
});

0 commit comments

Comments
 (0)