From 391c1aecc88a4e5fe598083716c69b8653b8c0fc Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 14 Dec 2021 11:12:18 +0100 Subject: [PATCH] Test for rule update --- test/specs/style_manager/model/Properties.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/specs/style_manager/model/Properties.js b/test/specs/style_manager/model/Properties.js index 2cd193bbe..193d6aff6 100644 --- a/test/specs/style_manager/model/Properties.js +++ b/test/specs/style_manager/model/Properties.js @@ -224,6 +224,25 @@ describe('StyleManager properties logic', () => { }); }); + test('Updating the rule reflects in layers', () => { + rule1.setStyle({ + [propTest]: 'valueAa-1 valueBb-1 valueCc-1, valueAa-2 valueBb-2 valueCc-2', + [propBTest]: 'valueB-1-ext, valueB-2-ext', + }); + obj.__upSel(); + expect(compTypeProp.getLayers().length).toBe(2); + expect(compTypeProp.getLayer(0).getValues()).toEqual({ + [propATest]: 'valueAa-1', + [propBTest]: 'valueB-1-ext', + [propCTest]: 'valueCc-1', + }); + expect(compTypeProp.getLayer(1).getValues()).toEqual({ + [propATest]: 'valueAa-2', + [propBTest]: 'valueB-2-ext', + [propCTest]: 'valueCc-2', + }); + }); + test('Updating inner property, it reflects on the rule', () => { expect(rule1.getStyle()).toEqual({ [propTest]: propStyleValue,