From 11c2e1bd44ef8bb41b0f08ef87ccc5bc20c6f044 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 14 Feb 2024 01:59:43 +0400 Subject: [PATCH] Up --- test/specs/style_manager/model/Properties.ts | 108 +++++++++---------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/test/specs/style_manager/model/Properties.ts b/test/specs/style_manager/model/Properties.ts index 134a51d34..aa1835d29 100644 --- a/test/specs/style_manager/model/Properties.ts +++ b/test/specs/style_manager/model/Properties.ts @@ -652,60 +652,6 @@ describe('StyleManager properties logic', () => { expect(rule1.getStyle()).toEqual({}); }); - describe('emptyValue', () => { - test('Removing all layers with empty value as string', () => { - compTypeProp.set('emptyValue', 'unset'), compTypeProp.removeLayerAt(1); - compTypeProp.removeLayerAt(0); - expect(compTypeProp.getLayers().length).toBe(0); - expect(rule1.getStyle()).toEqual({ - [propTest]: 'unset', - }); - }); - - test('Removing all layers with empty value as string (detached)', () => { - compTypeProp.set('emptyValue', 'unset'), compTypeProp.set('detached', true); - compTypeProp.removeLayerAt(1); - compTypeProp.removeLayerAt(0); - expect(compTypeProp.getLayers().length).toBe(0); - expect(rule1.getStyle()).toEqual({ - [propATest]: 'unset', - [propBTest]: 'unset', - [propCTest]: 'unset', - }); - }); - - test('Removing all layers with empty value as function', () => { - compTypeProp.set('emptyValue', () => ({ - [propATest]: 'unset-a', - [propBTest]: 'unset-b', - })), - compTypeProp.removeLayerAt(1); - compTypeProp.removeLayerAt(0); - expect(compTypeProp.getLayers().length).toBe(0); - expect(rule1.getStyle()).toEqual({ - [propATest]: 'unset-a', - [propBTest]: 'unset-b', - }); - }); - - test('Removing all layers with empty value as function (detached)', () => { - compTypeProp.set('detached', true); - compTypeProp.set('emptyValue', () => ({ - [propATest]: 'unset-a', - [propBTest]: 'unset-b', - [propCTest]: 'unset-c', - })), - compTypeProp.removeLayerAt(1); - compTypeProp.removeLayerAt(0); - expect(compTypeProp.getLayers().length).toBe(0); - expect(rule1.getStyle()).toEqual({ - [propATest]: 'unset-a', - [propBTest]: 'unset-b', - [propCTest]: 'unset-c', - }); - }); - }); - test('On clear removes all values', () => { compTypeProp.addLayer(); compTypeProp.clear(); @@ -788,5 +734,59 @@ describe('StyleManager properties logic', () => { [propCTest]: 'valueC-2-ext', }); }); + + describe('emptyValue', () => { + test('Removing all layers with empty value as string', () => { + compTypeProp.set('emptyValue', 'unset'), compTypeProp.removeLayerAt(1); + compTypeProp.removeLayerAt(0); + expect(compTypeProp.getLayers().length).toBe(0); + expect(rule1.getStyle()).toEqual({ + [propTest]: 'unset', + }); + }); + + test('Removing all layers with empty value as string (detached)', () => { + compTypeProp.set('emptyValue', 'unset'), compTypeProp.set('detached', true); + compTypeProp.removeLayerAt(1); + compTypeProp.removeLayerAt(0); + expect(compTypeProp.getLayers().length).toBe(0); + expect(rule1.getStyle()).toEqual({ + [propATest]: 'unset', + [propBTest]: 'unset', + [propCTest]: 'unset', + }); + }); + + test('Removing all layers with empty value as function', () => { + compTypeProp.set('emptyValue', () => ({ + [propATest]: 'unset-a', + [propBTest]: 'unset-b', + })), + compTypeProp.removeLayerAt(1); + compTypeProp.removeLayerAt(0); + expect(compTypeProp.getLayers().length).toBe(0); + expect(rule1.getStyle()).toEqual({ + [propATest]: 'unset-a', + [propBTest]: 'unset-b', + }); + }); + + test('Removing all layers with empty value as function (detached)', () => { + compTypeProp.set('detached', true); + compTypeProp.set('emptyValue', () => ({ + [propATest]: 'unset-a', + [propBTest]: 'unset-b', + [propCTest]: 'unset-c', + })), + compTypeProp.removeLayerAt(1); + compTypeProp.removeLayerAt(0); + expect(compTypeProp.getLayers().length).toBe(0); + expect(rule1.getStyle()).toEqual({ + [propATest]: 'unset-a', + [propBTest]: 'unset-b', + [propCTest]: 'unset-c', + }); + }); + }); }); });