Skip to content

Commit

Permalink
fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
taulinger committed Jan 15, 2025
1 parent 8ceaf42 commit 1946254
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/plugins/LayersPlugin.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand Down

0 comments on commit 1946254

Please sign in to comment.