From 644c3573400956c2f9974c98f41d1fae349d7e27 Mon Sep 17 00:00:00 2001 From: mohamedsalem401 Date: Fri, 27 Dec 2024 08:56:13 +0200 Subject: [PATCH] Update props tests --- .../specs/data_sources/dynamic_values/props.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/core/test/specs/data_sources/dynamic_values/props.ts b/packages/core/test/specs/data_sources/dynamic_values/props.ts index 678ce9e96..7a9d9c739 100644 --- a/packages/core/test/specs/data_sources/dynamic_values/props.ts +++ b/packages/core/test/specs/data_sources/dynamic_values/props.ts @@ -70,18 +70,23 @@ describe('Component Dynamic Properties', () => { }; dsm.add(dataSource); + const dataVariable = { + type: DataVariableType, + path: 'ds_id.id1.value', + defaultValue: 'default', + }; const cmp = cmpRoot.append({ tagName: 'div', - content: { - type: DataVariableType, - path: 'ds_id.id1.value', - defaultValue: 'default', - }, + content: dataVariable, })[0]; cmp.set('content', 'static-value'); dsm.get('ds_id').getRecord('id1')?.set('value', 'new-dynamic-value'); expect(cmp.get('content')).toBe('static-value'); + + // @ts-ignore + cmp.set({ content: dataVariable }); + expect(cmp.get('content')).toBe('new-dynamic-value'); }); test('updating to a new dynamic value listens to the new dynamic value only', () => {