From 81f4a207a748a4ea71fb1475e667fc7373612949 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 6 Dec 2017 15:04:32 +0200 Subject: [PATCH] test(route) keys panel: show --- server/route.js | 36 +++++++++++++++++++----------------- test/server/route.js | 17 ++++++++++++++++- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/server/route.js b/server/route.js index 77efe070..4555f798 100644 --- a/server/route.js +++ b/server/route.js @@ -43,8 +43,6 @@ module.exports._getIndexPath = getIndexPath; * additional processing of index file */ function indexProcessing(options) { - const keysPanel = '
{ }); }); -test('cloudcmd: route: keys panel', (t) => { +test('cloudcmd: route: keys panel: hide', (t) => { const config = { showKeysPanel: false }; @@ -163,6 +163,21 @@ test('cloudcmd: route: keys panel', (t) => { }); }); +test('cloudcmd: route: keys panel', (t) => { + const config = { + showKeysPanel: true + }; + + before({config}, (port, after) => { + getStr(`http://localhost:${port}/`) + .then((result) => { + t.notOk(/keyspanel hidden/.test(result), 'should show keyspanel'); + t.end(); + after(); + }); + }); +}); + test('cloudcmd: route: no index', (t) => { const name = path.join(__dirname, '../../dist/index.html'); const nameAfter = path.join(__dirname, '../../dist/index1.html');