From 6e4733aacca5bbbd61c7dc175b43aa438aa04503 Mon Sep 17 00:00:00 2001 From: shadowusr Date: Mon, 30 Oct 2023 03:37:26 +0300 Subject: [PATCH] fix: fix gui tests and update hermione local config --- test/func/tests/common-gui/index.hermione.js | 2 +- test/func/tests/common-tinder/index.hermione.js | 2 +- test/func/tests/local.hermione.conf.js | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/test/func/tests/common-gui/index.hermione.js b/test/func/tests/common-gui/index.hermione.js index 4bc2dfc99..ddc87b890 100644 --- a/test/func/tests/common-gui/index.hermione.js +++ b/test/func/tests/common-gui/index.hermione.js @@ -33,7 +33,7 @@ describe('GUI mode', () => { beforeEach(async ({browser}) => { await fs.cp(reportDir, reportBackupDir, {recursive: true}); - guiProcess = await runGui(); + guiProcess = await runGui(projectDir); await browser.url(guiUrl); await browser.$('button*=Expand all').click(); diff --git a/test/func/tests/common-tinder/index.hermione.js b/test/func/tests/common-tinder/index.hermione.js index 28046b91c..e17a33afe 100644 --- a/test/func/tests/common-tinder/index.hermione.js +++ b/test/func/tests/common-tinder/index.hermione.js @@ -23,7 +23,7 @@ describe('Tinder mode', () => { beforeEach(async ({browser}) => { await fs.cp(reportDir, reportBackupDir, {recursive: true}); - guiProcess = await runGui(); + guiProcess = await runGui(projectDir); await browser.url(guiUrl); await browser.$('button*=Expand all').click(); diff --git a/test/func/tests/local.hermione.conf.js b/test/func/tests/local.hermione.conf.js index fdd79fbf5..2a29299c4 100644 --- a/test/func/tests/local.hermione.conf.js +++ b/test/func/tests/local.hermione.conf.js @@ -11,19 +11,13 @@ const _ = require('lodash'); const mainConfig = require('./.hermione.conf.js'); -// Make sure to adjust chromium binary path to a desired Chromium location. -const CHROME_BINARY_PATH = '/Applications/Chromium.app/Contents/MacOS/Chromium'; - const config = _.merge(mainConfig, { - // Default chromedriver host and port. Adjust to your needs. - gridUrl: 'http://localhost:9515/', - browsers: { chrome: { + automationProtocol: 'devtools', desiredCapabilities: { 'goog:chromeOptions': { args: ['no-sandbox', 'hide-scrollbars'], - binary: CHROME_BINARY_PATH } }, waitTimeout: 3000 @@ -31,4 +25,7 @@ const config = _.merge(mainConfig, { } }); +delete config.gridUrl; +delete config.browsers.chrome.desiredCapabilities['goog:chromeOptions'].binary; + module.exports = config;