@testring/plugin-selenium-driver 0.6.12 → 0.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,7 +74,7 @@ class SeleniumPlugin {
74
74
  }
75
75
  // eslint-disable-next-line sonarjs/cognitive-complexity
76
76
  createConfig(config) {
77
- var _a, _b, _c, _d;
77
+ var _a, _b;
78
78
  let mergedConfig = deepmerge.all([DEFAULT_CONFIG, config], {
79
79
  clone: true,
80
80
  });
@@ -130,10 +130,8 @@ class SeleniumPlugin {
130
130
  mergedConfig.hostname = mergedConfig.host;
131
131
  }
132
132
  const googleChromeOptions = (_a = mergedConfig.capabilities) === null || _a === void 0 ? void 0 : _a['goog:chromeOptions'];
133
- if (googleChromeOptions &&
134
- (((_b = googleChromeOptions.args) === null || _b === void 0 ? void 0 : _b.includes('--headless')) ||
135
- ((_c = googleChromeOptions.args) === null || _c === void 0 ? void 0 : _c.includes('headless')))) {
136
- const extensions = (_d = mergedConfig.capabilities) === null || _d === void 0 ? void 0 : _d['goog:chromeOptions'].extensions;
133
+ if ((_b = googleChromeOptions === null || googleChromeOptions === void 0 ? void 0 : googleChromeOptions.args) === null || _b === void 0 ? void 0 : _b.includes('--headless=new')) {
134
+ const extensions = googleChromeOptions.extensions;
137
135
  const dowldMonitorCrx = (0, dwnld_collector_crx_1.getCrxBase64)();
138
136
  if (extensions) {
139
137
  extensions.push(dowldMonitorCrx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testring/plugin-selenium-driver",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "main": "./dist/index.js",
5
5
  "typings": "./src/index.ts",
6
6
  "repository": {
@@ -11,12 +11,12 @@
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
13
  "@nullcc/code-coverage-client": "1.4.2",
14
- "@testring/child-process": "0.6.12",
15
- "@testring/devtool-extension": "0.6.12",
16
- "@testring/dwnld-collector-crx": "0.6.12",
17
- "@testring/logger": "0.6.12",
18
- "@testring/plugin-api": "0.6.12",
19
- "@testring/types": "0.6.12",
14
+ "@testring/child-process": "0.6.13",
15
+ "@testring/devtool-extension": "0.6.13",
16
+ "@testring/dwnld-collector-crx": "0.6.13",
17
+ "@testring/logger": "0.6.13",
18
+ "@testring/plugin-api": "0.6.13",
19
+ "@testring/types": "0.6.13",
20
20
  "@types/deepmerge": "2.2.0",
21
21
  "@types/node": "18.11.18",
22
22
  "chromedriver": "*",
@@ -187,14 +187,8 @@ export class SeleniumPlugin implements IBrowserProxyPlugin {
187
187
  }
188
188
 
189
189
  const googleChromeOptions = mergedConfig.capabilities?.['goog:chromeOptions'];
190
- if (
191
- googleChromeOptions &&
192
- (
193
- googleChromeOptions.args?.includes('--headless') ||
194
- googleChromeOptions.args?.includes('headless')
195
- )
196
- ) {
197
- const extensions = mergedConfig.capabilities?.['goog:chromeOptions'].extensions;
190
+ if (googleChromeOptions?.args?.includes('--headless=new')) {
191
+ const extensions = googleChromeOptions.extensions;
198
192
  const dowldMonitorCrx = getCrxBase64();
199
193
  if (extensions) {
200
194
  extensions.push(dowldMonitorCrx);