From 6bcc1ade1a808d6c0873e73dddb5f1cf04c86dba Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 13 Dec 2021 14:42:41 +0100 Subject: [PATCH] Test getLayersFromStyle --- test/specs/style_manager/model/Properties.js | 26 +++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/test/specs/style_manager/model/Properties.js b/test/specs/style_manager/model/Properties.js index 72db09ce5..2514b8c18 100644 --- a/test/specs/style_manager/model/Properties.js +++ b/test/specs/style_manager/model/Properties.js @@ -135,7 +135,31 @@ describe('StyleManager properties logic', () => { expect(compTypeProp.getSelectedLayer()).toBe(null); }); - test.only('Layers has the right values', () => { + test('getLayersFromStyle returns correct values', () => { + expect( + compTypeProp.__getLayersFromStyle({ + [propTest]: 'valueA-1 valueB-1 valueC-1, valueA-2 valueB-2 valueC-2', + [propCTest]: 'valueC-1-ext, valueC-2-ext, valueC-3-ext', + [propBTest]: 'valueB-1-ext', + }) + ).toEqual([ + { + [propATest]: 'valueA-1', + [propBTest]: 'valueB-1-ext', + [propCTest]: 'valueC-1-ext', + }, + { + [propATest]: 'valueA-2', + [propBTest]: 'valueB-2', + [propCTest]: 'valueC-2-ext', + }, + { + [propCTest]: 'valueC-3-ext', + }, + ]); + }); + + test('Layers has the right values', () => { expect(compTypeProp.getLayer(0).getValues()).toEqual({ [propATest]: 'valueA-1', [propBTest]: 'valueB-1',