mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat(tests): Adds target for grid ff tests.
This commit is contained in:
@@ -228,7 +228,9 @@
|
||||
"test-dev": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.dev.conf.ts",
|
||||
"test-dev-single": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.dev.conf.ts --spec",
|
||||
"test-grid": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.conf.ts",
|
||||
"test-grid-single": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.conf.ts --spec"
|
||||
"test-grid-single": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.conf.ts --spec",
|
||||
"test-grid-ff": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.firefox.conf.ts",
|
||||
"test-grid-ff-single": "DOTENV_CONFIG_PATH=tests/.env wdio run tests/wdio.grid.firefox.conf.ts --spec"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "17.0.14",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// wdio.grid.conf.ts
|
||||
// extends the main configuration file to add the selenium grid address
|
||||
import { merge } from 'lodash-es';
|
||||
import { URL } from 'url';
|
||||
|
||||
// @ts-ignore
|
||||
@@ -9,13 +8,14 @@ import { config as defaultConfig } from './wdio.conf.ts';
|
||||
const gridUrl = new URL(process.env.GRID_HOST_URL as string);
|
||||
const protocol = gridUrl.protocol.replace(':', '');
|
||||
|
||||
const mergedConfig = merge(defaultConfig, {
|
||||
const mergedConfig = {
|
||||
...defaultConfig,
|
||||
protocol,
|
||||
hostname: gridUrl.hostname,
|
||||
port: gridUrl.port ? parseInt(gridUrl.port, 10) // Convert port to number
|
||||
: protocol === 'http' ? 80 : 443,
|
||||
path: gridUrl.pathname
|
||||
}, { clone: false });
|
||||
};
|
||||
|
||||
mergedConfig.capabilities.participant1.capabilities['goog:chromeOptions'].args
|
||||
= updateRemoteResource(mergedConfig.capabilities.participant1.capabilities['goog:chromeOptions'].args);
|
||||
|
||||
18
tests/wdio.grid.firefox.conf.ts
Normal file
18
tests/wdio.grid.firefox.conf.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// wdio.grid.conf.ts
|
||||
// extends the main configuration file to add the selenium grid address
|
||||
import { URL } from 'url';
|
||||
|
||||
// @ts-ignore
|
||||
import { config as defaultConfig } from './wdio.firefox.conf.ts';
|
||||
|
||||
const gridUrl = new URL(process.env.GRID_HOST_URL as string);
|
||||
const protocol = gridUrl.protocol.replace(':', '');
|
||||
|
||||
export const config = {
|
||||
...defaultConfig,
|
||||
protocol,
|
||||
hostname: gridUrl.hostname,
|
||||
port: gridUrl.port ? parseInt(gridUrl.port, 10) // Convert port to number
|
||||
: protocol === 'http' ? 80 : 443,
|
||||
path: gridUrl.pathname
|
||||
};
|
||||
Reference in New Issue
Block a user