From 697c11ac8d770ae9311f0c9aa10996dd60001dfb Mon Sep 17 00:00:00 2001 From: mohamedsalem401 Date: Fri, 10 Jan 2025 13:25:38 +0200 Subject: [PATCH] Udpate tests for Diffirent Collection variable types --- .../CollectionComponent.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts b/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts index c0a69adbf..cba58f1d9 100644 --- a/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts +++ b/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts @@ -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: { @@ -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]); }); }); });