From 928fd8c51fa8f97ea483317f2a15cf9d84f60c4d Mon Sep 17 00:00:00 2001 From: rogup Date: Tue, 12 Mar 2024 17:11:16 +0000 Subject: [PATCH] Add UT for defaultPanel config --- test/configs/typical/config.json | 4 +++- test/test-model-config.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/configs/typical/config.json b/test/configs/typical/config.json index 6de7f67d..cc90d608 100644 --- a/test/configs/typical/config.json +++ b/test/configs/typical/config.json @@ -13,5 +13,7 @@ "disableClusteringAtZoom": 10, "maxZoomOnGroup":12, "maxZoomOnOne": 14, - "maxZoomOnSearch": 12 + "maxZoomOnSearch": 12, + "defaultPanel": "about", + "defaultOpenSidebar": true } diff --git a/test/test-model-config.js b/test/test-model-config.js index 41d0c655..431657fe 100644 --- a/test/test-model-config.js +++ b/test/test-model-config.js @@ -1,5 +1,4 @@ 'use strict'; -//const fs = require('fs'); import { assert } from 'chai'; import { init as configBuilder } from '../src/map-app/app/model/config'; @@ -8,7 +7,6 @@ import rawConfig from './configs/typical/config.json'; import version from './configs/typical/version.json'; const about = `This is a dummy about.html! `; -//fs.readFileSync('test/configs/typical/about.html'); const combinedConfig = { ...rawConfig, ...version, aboutHtml: about }; describe('The config.js module', function () { @@ -39,6 +37,8 @@ describe('The config.js module', function () { assert.equal(config.getMaxZoomOnOne(), 14); assert.equal(config.getMaxZoomOnSearch(), 12); assert.equal(config.logo(), undefined); + assert.equal(config.getDefaultPanel(), "about"); + assert.equal(config.getDefaultOpenSidebar(), true); }); }); });