From 652655a90fccef8613480bca6a3a72e2ae9c39e8 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Wed, 19 Feb 2020 19:34:30 +0100 Subject: [PATCH] Fix uLayers array in failing test --- js/test/api_openlayers.test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/test/api_openlayers.test.js b/js/test/api_openlayers.test.js index a479689..520ade6 100644 --- a/js/test/api_openlayers.test.js +++ b/js/test/api_openlayers.test.js @@ -21,6 +21,7 @@ import * as ol from '../src/lib/ol.js'; import OpenlayersApi from '../src/mapapi/api_openlayers.js'; import TrackFactory from './helpers/trackfactory.js'; import { config } from '../src/initializer.js' +import uLayer from '../src/layer.js'; import uUtils from '../src/utils.js'; describe('Openlayers map API tests', () => { @@ -76,10 +77,11 @@ describe('Openlayers map API tests', () => { it('should initialize map layers with config values', () => { // given spyOn(api, 'initLayerSwitcher'); - config.olLayers = { - 'layer1': 'http://layer1', - 'layer2': 'http://layer2' - }; + config.olLayers = [ + new uLayer(1, 'layer1', 'http://layer1', 0), + new uLayer(1, 'layer2', 'http://layer2', 0) + ]; + api.map = mockMap; // when api.initLayers();