Skip to content

Commit

Permalink
Udpate tests for Diffirent Collection variable types
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedsalem401 committed Jan 10, 2025
1 parent b7d2793 commit 697c11a
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,29 @@ describe('Collection component', () => {
type: CollectionVariableType,
variable_type: variableType,
},
attributes: {
custom_attribute: {
type: CollectionVariableType,
variable_type: variableType,
},
},
traits: [
{
name: 'attribute_trait',
value: {
type: CollectionVariableType,
variable_type: variableType,
},
},
{
name: 'property_trait',
changeProp: true,
value: {
type: CollectionVariableType,
variable_type: variableType,
},
},
],
},
config: {
dataSource: {
Expand All @@ -605,6 +628,9 @@ describe('Collection component', () => {

children.each((child, index) => {
expect(child.get('content')).toBe(expectedValues[index]);
expect(child.get('property_trait')).toBe(expectedValues[index]);
expect(child.getAttributes()['custom_attribute']).toBe(expectedValues[index]);
expect(child.getAttributes()['attribute_trait']).toBe(expectedValues[index]);
});
});
});
Expand Down

0 comments on commit 697c11a

Please sign in to comment.