From 19462549014ddad7e5e927731c7a78e9cdf6e8fc Mon Sep 17 00:00:00 2001 From: Thomas Aulinger Date: Wed, 15 Jan 2025 19:21:50 +0100 Subject: [PATCH] fix broken test --- test/plugins/LayersPlugin.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/plugins/LayersPlugin.test.js b/test/plugins/LayersPlugin.test.js index 4a2a6ac9d2..1e7ea1d514 100644 --- a/test/plugins/LayersPlugin.test.js +++ b/test/plugins/LayersPlugin.test.js @@ -1,6 +1,6 @@ import { LayersPlugin } from '../../src/plugins/LayersPlugin'; import { TestUtils } from '../test-utils.js'; -import { layersReducer } from '../../src/store/layers/layers.reducer'; +import { createDefaultLayersConstraints, layersReducer } from '../../src/store/layers/layers.reducer'; import { $injector } from '../../src/injection'; import { GeoResourceFuture, XyzGeoResource } from '../../src/domain/geoResources'; import { QueryParameters } from '../../src/domain/queryParameters'; @@ -366,9 +366,9 @@ describe('LayersPlugin', () => { expect(store.getState().layers.active.length).toBe(2); expect(store.getState().layers.active[0].id).toBe('some0_0'); - expect(store.getState().layers.active[0].constraints.swipeAlignment).toEqual(SwipeAlignment.RIGHT); + expect(store.getState().layers.active[0].constraints).toEqual({ ...createDefaultLayersConstraints(), swipeAlignment: SwipeAlignment.RIGHT }); expect(store.getState().layers.active[1].id).toBe('some1_0'); - expect(store.getState().layers.active[1].constraints.swipeAlignment).toEqual(SwipeAlignment.LEFT); + expect(store.getState().layers.active[1].constraints).toEqual({ ...createDefaultLayersConstraints(), swipeAlignment: SwipeAlignment.LEFT }); }); it('adds layers considering unusable swipeAlignment params', () => { @@ -389,9 +389,9 @@ describe('LayersPlugin', () => { expect(store.getState().layers.active.length).toBe(2); expect(store.getState().layers.active[0].id).toBe('some0_0'); - expect(store.getState().layers.active[0].constraints.swipeAlignment).toBeUndefined(); + expect(store.getState().layers.active[0].constraints).toEqual(createDefaultLayersConstraints()); expect(store.getState().layers.active[1].id).toBe('some1_0'); - expect(store.getState().layers.active[1].constraints.swipeAlignment).toBeUndefined(); + expect(store.getState().layers.active[1].constraints).toEqual(createDefaultLayersConstraints()); }); it('does NOT add a layer when geoResourceService cannot fulfill', () => {