From 3e4c31618adf7d66815085c1c442dc0b7f8ea2d1 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Mon, 15 Apr 2024 10:31:26 +0800 Subject: [PATCH] Fix tests --- test/testAdapter.gui.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/testAdapter.gui.js b/test/testAdapter.gui.js index 137f5752..0813df4b 100644 --- a/test/testAdapter.gui.js +++ b/test/testAdapter.gui.js @@ -6,7 +6,7 @@ let gPage; let gBrowser; describe('vis', () => { - before(async function (){ + before(async function () { this.timeout(180_000); // install js-controller, web and vis-2 @@ -55,12 +55,20 @@ describe('vis', () => { await runtimePage.close(); }); - after(async function () { + after(function (done) { this.timeout(8_000); - await helper.stopBrowser(); - console.log('browser stopped'); - - await helper.stopIoBroker(); - console.log('ioBroker stopped'); + helper.stopBrowser() + .then(() => { + console.log('browser stopped'); + try { + return setup.stopCustomAdapter('web', 0); + } catch (e) { + console.error(`Cannot stop ioBroker: ${e}`); + } + }) + .then(() => { + console.log('ioBroker stopped'); + done(); + }); }); });