@wdio/runner 9.0.0-alpha.115 → 9.0.0-alpha.321
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.
- package/build/browser.d.ts +3 -4
- package/build/browser.d.ts.map +1 -1
- package/build/browser.js +3 -5
- package/build/index.d.ts +0 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -57
- package/build/reporter.d.ts +2 -2
- package/build/reporter.d.ts.map +1 -1
- package/build/types.d.ts +2 -10
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +4 -4
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +9 -2
- package/package.json +10 -10
package/build/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Options } from '@wdio/types';
|
|
2
2
|
import type BaseReporter from './reporter.js';
|
|
3
3
|
import type { TestFramework } from './types.js';
|
|
4
4
|
type WDIOErrorEvent = Partial<Pick<ErrorEvent, 'filename' | 'message' | 'error'>> & {
|
|
@@ -17,18 +17,17 @@ export default class BrowserFramework implements Omit<TestFramework, 'init'> {
|
|
|
17
17
|
private _cid;
|
|
18
18
|
private _config;
|
|
19
19
|
private _specs;
|
|
20
|
-
private _capabilities;
|
|
21
20
|
private _reporter;
|
|
22
21
|
constructor(_cid: string, _config: Options.Testrunner & {
|
|
23
22
|
sessionId?: string;
|
|
24
|
-
}, _specs: string[],
|
|
23
|
+
}, _specs: string[], _reporter: BaseReporter);
|
|
25
24
|
/**
|
|
26
25
|
* always return true as it is irrelevant for component testing
|
|
27
26
|
*/
|
|
28
27
|
hasTests(): boolean;
|
|
29
28
|
init(): TestFramework;
|
|
30
29
|
run(): Promise<number>;
|
|
31
|
-
static init(cid: string, config: any, specs: string[],
|
|
30
|
+
static init(cid: string, config: any, specs: string[], _: unknown, reporter: BaseReporter): BrowserFramework;
|
|
32
31
|
}
|
|
33
32
|
export {};
|
|
34
33
|
//# sourceMappingURL=browser.d.ts.map
|
package/build/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgB,KAAK,OAAO,EAAgC,MAAM,aAAa,CAAA;AAGtF,OAAO,KAAK,YAAY,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAyB,MAAM,YAAY,CAAA;AAOtE,KAAK,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAQ9G,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,cAAc,EAAE,cAAc,EAAE,CAAA;QAChC,cAAc,EAAE,GAAG,EAAE,CAAA;QACrB,gBAAgB,EAAE,MAAM,CAAA;QACxB,YAAY,CAAC,EAAE,OAAO,CAAA;KACzB;CACJ;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;;IAKpE,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,SAAS;gBAHT,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,CAAC,UAAU,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,EACpD,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,YAAY;IASnC;;OAEG;IACH,QAAQ;IAIR,IAAI;IAIE,GAAG;IA6YT,MAAM,CAAC,IAAI,CAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY;CAI7F"}
|
package/build/browser.js
CHANGED
|
@@ -15,15 +15,13 @@ export default class BrowserFramework {
|
|
|
15
15
|
_cid;
|
|
16
16
|
_config;
|
|
17
17
|
_specs;
|
|
18
|
-
_capabilities;
|
|
19
18
|
_reporter;
|
|
20
19
|
#runnerOptions; // `any` here because we don't want to create a dependency to @wdio/browser-runner
|
|
21
20
|
#resolveTestStatePromise;
|
|
22
|
-
constructor(_cid, _config, _specs,
|
|
21
|
+
constructor(_cid, _config, _specs, _reporter) {
|
|
23
22
|
this._cid = _cid;
|
|
24
23
|
this._config = _config;
|
|
25
24
|
this._specs = _specs;
|
|
26
|
-
this._capabilities = _capabilities;
|
|
27
25
|
this._reporter = _reporter;
|
|
28
26
|
// listen on testrunner events
|
|
29
27
|
process.on('message', this.#processMessage.bind(this));
|
|
@@ -378,8 +376,8 @@ export default class BrowserFramework {
|
|
|
378
376
|
});
|
|
379
377
|
}
|
|
380
378
|
}
|
|
381
|
-
static init(cid, config, specs,
|
|
382
|
-
const framework = new BrowserFramework(cid, config, specs,
|
|
379
|
+
static init(cid, config, specs, _, reporter) {
|
|
380
|
+
const framework = new BrowserFramework(cid, config, specs, reporter);
|
|
383
381
|
return framework;
|
|
384
382
|
}
|
|
385
383
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -40,10 +40,6 @@ export default class Runner extends EventEmitter {
|
|
|
40
40
|
* @return {Promise} resolves with browser object or null if session couldn't get established
|
|
41
41
|
*/
|
|
42
42
|
private _startSession;
|
|
43
|
-
/**
|
|
44
|
-
* fetch logs provided by browser driver
|
|
45
|
-
*/
|
|
46
|
-
private _fetchDriverLogs;
|
|
47
43
|
/**
|
|
48
44
|
* kill worker session
|
|
49
45
|
*/
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAc1C,OAAO,KAAK,EACoD,SAAS,EAExE,MAAM,YAAY,CAAA;AAInB,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,YAAY;;IAC5C,OAAO,CAAC,QAAQ,CAAC,CAAsD;IACvE,OAAO,CAAC,aAAa,CAAC,CAAc;IACpC,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,sBAAsB,CAAI;IAElC,OAAO,CAAC,SAAS,CAAC,CAAc;IAChC,OAAO,CAAC,UAAU,CAAC,CAAe;IAClC,OAAO,CAAC,OAAO,CAAC,CAAoB;IACpC,OAAO,CAAC,IAAI,CAAC,CAAQ;IACrB,OAAO,CAAC,MAAM,CAAC,CAAU;IACzB,OAAO,CAAC,KAAK,CAAC,CAA8F;IAE5G;;;;;;;;;OASG;IACG,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,SAAS;IAqMpE;;;;;;OAMG;YACW,YAAY;IAkC1B;;;;;OAKG;YACW,aAAa;IAqE3B;;OAEG;YACW,SAAS;IAmCvB;;;OAGG;IACG,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG;CAwEjC;AAED,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,eAAe,CAAA;AACvD,cAAc,YAAY,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import fs from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
1
|
import { EventEmitter } from 'node:events';
|
|
4
2
|
import logger from '@wdio/logger';
|
|
5
3
|
import { initializeWorkerService, initializePlugin, executeHooksWithArgs } from '@wdio/utils';
|
|
@@ -9,7 +7,7 @@ import { expect, setOptions, SnapshotService } from 'expect-webdriverio';
|
|
|
9
7
|
import { attach } from 'webdriverio';
|
|
10
8
|
import BrowserFramework from './browser.js';
|
|
11
9
|
import BaseReporter from './reporter.js';
|
|
12
|
-
import { initializeInstance,
|
|
10
|
+
import { initializeInstance, getInstancesData } from './utils.js';
|
|
13
11
|
const log = logger('@wdio/runner');
|
|
14
12
|
export default class Runner extends EventEmitter {
|
|
15
13
|
_browser;
|
|
@@ -155,7 +153,6 @@ export default class Runner extends EventEmitter {
|
|
|
155
153
|
let failures = 0;
|
|
156
154
|
try {
|
|
157
155
|
failures = await this._framework.run();
|
|
158
|
-
await this._fetchDriverLogs(this._config, caps.excludeDriverLogs);
|
|
159
156
|
}
|
|
160
157
|
catch (err) {
|
|
161
158
|
log.error(err);
|
|
@@ -290,58 +287,6 @@ export default class Runner extends EventEmitter {
|
|
|
290
287
|
}
|
|
291
288
|
return this._browser;
|
|
292
289
|
}
|
|
293
|
-
/**
|
|
294
|
-
* fetch logs provided by browser driver
|
|
295
|
-
*/
|
|
296
|
-
async _fetchDriverLogs(config, excludeDriverLogs) {
|
|
297
|
-
/**
|
|
298
|
-
* only fetch logs if
|
|
299
|
-
*/
|
|
300
|
-
if (
|
|
301
|
-
/**
|
|
302
|
-
* a log directory is given in config
|
|
303
|
-
*/
|
|
304
|
-
!config.outputDir ||
|
|
305
|
-
/**
|
|
306
|
-
* the session wasn't killed during start up phase
|
|
307
|
-
*/
|
|
308
|
-
!this._browser?.sessionId ||
|
|
309
|
-
/**
|
|
310
|
-
* driver supports it
|
|
311
|
-
*/
|
|
312
|
-
typeof this._browser?.getLogs === 'undefined') {
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
let logTypes;
|
|
316
|
-
try {
|
|
317
|
-
logTypes = await this._browser.getLogTypes();
|
|
318
|
-
}
|
|
319
|
-
catch (errIgnored) {
|
|
320
|
-
/**
|
|
321
|
-
* getLogTypes is not supported by browser
|
|
322
|
-
*/
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
logTypes = filterLogTypes(excludeDriverLogs, logTypes);
|
|
326
|
-
log.debug(`Fetching logs for ${logTypes.join(', ')}`);
|
|
327
|
-
return Promise.all(logTypes.map(async (logType) => {
|
|
328
|
-
let logs;
|
|
329
|
-
try {
|
|
330
|
-
logs = await this._browser?.getLogs(logType);
|
|
331
|
-
}
|
|
332
|
-
catch (e) {
|
|
333
|
-
return log.warn(`Couldn't fetch logs for ${logType}: ${e.message}`);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* don't write to file if no logs were captured
|
|
337
|
-
*/
|
|
338
|
-
if (!Array.isArray(logs) || logs.length === 0) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
const stringLogs = logs.map((log) => JSON.stringify(log)).join('\n');
|
|
342
|
-
return fs.writeFile(path.join(config.outputDir, `wdio-${this._cid}-${logType}.log`), stringLogs, 'utf-8');
|
|
343
|
-
}));
|
|
344
|
-
}
|
|
345
290
|
/**
|
|
346
291
|
* kill worker session
|
|
347
292
|
*/
|
|
@@ -414,10 +359,11 @@ export default class Runner extends EventEmitter {
|
|
|
414
359
|
return;
|
|
415
360
|
}
|
|
416
361
|
/**
|
|
417
|
-
* store capabilities for afterSession hook
|
|
362
|
+
* store updated capabilities for afterSession hook
|
|
418
363
|
*/
|
|
419
364
|
const capabilities = this._browser?.capabilities || {};
|
|
420
365
|
if (this._isMultiremote) {
|
|
366
|
+
const multiremoteBrowser = this._browser;
|
|
421
367
|
multiremoteBrowser.instances.forEach((browserName) => {
|
|
422
368
|
capabilities[browserName] = multiremoteBrowser.getInstance(browserName).capabilities;
|
|
423
369
|
});
|
package/build/reporter.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export default class BaseReporter {
|
|
|
8
8
|
#private;
|
|
9
9
|
private _config;
|
|
10
10
|
private _cid;
|
|
11
|
-
caps: Capabilities.
|
|
11
|
+
caps: Capabilities.RequestedStandaloneCapabilities | Capabilities.RequestedMultiremoteCapabilities;
|
|
12
12
|
private _reporters;
|
|
13
13
|
private listeners;
|
|
14
|
-
constructor(_config: Options.Testrunner, _cid: string, caps: Capabilities.
|
|
14
|
+
constructor(_config: Options.Testrunner, _cid: string, caps: Capabilities.RequestedStandaloneCapabilities | Capabilities.RequestedMultiremoteCapabilities);
|
|
15
15
|
initReporters(): Promise<void>;
|
|
16
16
|
/**
|
|
17
17
|
* emit events to all registered reporter and wdio launcer
|
package/build/reporter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAA;AAKnE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;;IAKzB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,IAAI;IACL,IAAI,EAAE,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAA;AAKnE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;;IAKzB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,IAAI;IACL,IAAI,EAAE,YAAY,CAAC,+BAA+B,GAAG,YAAY,CAAC,gCAAgC;IAN7G,OAAO,CAAC,UAAU,CAAmC;IACrD,OAAO,CAAC,SAAS,CAA4B;gBAGjC,OAAO,EAAE,OAAO,CAAC,UAAU,EAC3B,IAAI,EAAE,MAAM,EACb,IAAI,EAAE,YAAY,CAAC,+BAA+B,GAAG,YAAY,CAAC,gCAAgC;IAGvG,aAAa;IAMnB;;;;;OAKG;IACH,IAAI,CAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;IAuB7B,SAAS,CAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,GAAG,KAAK,IAAI;IAItC,UAAU,CAAE,IAAI,EAAE,MAAM;IAuCxB;;OAEG;IACH,oBAAoB,CAAE,QAAQ,EAAE,MAAM;yBAEc,OAAO;;IAoB3D;;;OAGG;IACH,WAAW;IA2BX;;OAEG;YACW,aAAa;CAoE9B"}
|
package/build/types.d.ts
CHANGED
|
@@ -12,23 +12,15 @@ export type RunParams = {
|
|
|
12
12
|
cid: string;
|
|
13
13
|
args: Args;
|
|
14
14
|
specs: string[];
|
|
15
|
-
caps: Capabilities.
|
|
15
|
+
caps: Capabilities.RequestedStandaloneCapabilities | Capabilities.RequestedMultiremoteCapabilities;
|
|
16
16
|
configFile: string;
|
|
17
17
|
retries: number;
|
|
18
18
|
};
|
|
19
19
|
export interface TestFramework {
|
|
20
|
-
init: (cid: string, config: Options.Testrunner, specs: string[], capabilities: Capabilities.
|
|
20
|
+
init: (cid: string, config: Options.Testrunner, specs: string[], capabilities: Capabilities.RequestedStandaloneCapabilities | Capabilities.RequestedMultiremoteCapabilities, reporter: BaseReporter) => TestFramework;
|
|
21
21
|
run(): Promise<number>;
|
|
22
22
|
hasTests(): boolean;
|
|
23
23
|
}
|
|
24
|
-
type SingleCapability = {
|
|
25
|
-
capabilities: Capabilities.RemoteCapability;
|
|
26
|
-
};
|
|
27
|
-
export interface SingleConfigOption extends Omit<Options.Testrunner, 'capabilities'>, SingleCapability {
|
|
28
|
-
}
|
|
29
|
-
export type MultiRemoteCaps = Record<string, (Capabilities.DesiredCapabilities | Capabilities.W3CCapabilities) & {
|
|
30
|
-
sessionId?: string;
|
|
31
|
-
}>;
|
|
32
24
|
export interface SessionStartedMessage {
|
|
33
25
|
origin: 'worker';
|
|
34
26
|
name: 'sessionStarted';
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE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,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,aAAa,EAAE,OAAO,CAAA;QACtB,aAAa,EAAE,OAAO,CAAA;QACtB,YAAY,EAAE,WAAW,CAAC,YAAY,CAAA;KACzC,CAAC;IACF,GAAG,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,QAAQ,CAAA;IAChB,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE;QACN,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;QACb,WAAW,EAAE,OAAO,CAAA;QACpB,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,aAAa,EAAE,MAAM,EAAE,CAAA;QACvB,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;KACjB,EAAE,CAAA;CACN;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,QAAQ,CAAA;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,QAAQ,CAAA;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE;QACF,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,OAAO,CAAC,aAAa,CAAA;KACjC,CAAA;CACJ"}
|
package/build/utils.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Options, Capabilities } from '@wdio/types';
|
|
2
|
-
export interface ConfigWithSessionId extends
|
|
2
|
+
export interface ConfigWithSessionId extends Options.Testrunner {
|
|
3
3
|
sessionId?: string;
|
|
4
|
-
capabilities: Capabilities.
|
|
4
|
+
capabilities: Capabilities.RequestedStandaloneCapabilities;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* sanitizes wdio config from capability properties
|
|
8
8
|
* @param {Object} caps desired session capabilities
|
|
9
9
|
* @return {Object} sanitized caps
|
|
10
10
|
*/
|
|
11
|
-
export declare function sanitizeCaps(
|
|
11
|
+
export declare function sanitizeCaps(capabilities: Capabilities.RequestedStandaloneCapabilities, filterOut?: boolean): Omit<WebdriverIO.Capabilities, 'logLevel'>;
|
|
12
12
|
/**
|
|
13
13
|
* initialize browser instance depending whether remote or multiremote is requested
|
|
14
14
|
* @param {Object} config configuration of sessions
|
|
@@ -16,7 +16,7 @@ export declare function sanitizeCaps(caps: Capabilities.RemoteCapability, filter
|
|
|
16
16
|
* @param {boolean} isMultiremote isMultiremote
|
|
17
17
|
* @return {Promise} resolves with browser object
|
|
18
18
|
*/
|
|
19
|
-
export declare function initializeInstance(config: ConfigWithSessionId, capabilities: Capabilities.
|
|
19
|
+
export declare function initializeInstance(config: ConfigWithSessionId | Options.Testrunner, capabilities: Capabilities.RequestedStandaloneCapabilities | Capabilities.RequestedMultiremoteCapabilities, isMultiremote?: boolean): Promise<WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser>;
|
|
20
20
|
/**
|
|
21
21
|
* Filter logTypes based on filter
|
|
22
22
|
* @param {string[]} excludeDriverLogs logTypes filter
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKxD,MAAM,WAAW,mBAAoB,SAAQ,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKxD,MAAM,WAAW,mBAAoB,SAAQ,OAAO,CAAC,UAAU;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,YAAY,CAAC,+BAA+B,CAAA;CAC7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CACxB,YAAY,EAAE,YAAY,CAAC,+BAA+B,EAC1D,SAAS,CAAC,EAAE,OAAO,GACpB,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,UAAU,CAAC,CAqB5C;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAChD,YAAY,EAAE,YAAY,CAAC,+BAA+B,GAAG,YAAY,CAAC,gCAAgC,EAC1G,aAAa,CAAC,EAAE,OAAO,GACxB,OAAO,CAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAkE/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC1B,iBAAiB,EAAE,MAAM,EAAE,EAC3B,cAAc,EAAE,MAAM,EAAE,YAa3B;AAED,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB,EAC7D,aAAa,EAAE,OAAO,oDAgBzB;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAE,GAAG,EAAE,GAAG,OAa5C"}
|
package/build/utils.js
CHANGED
|
@@ -10,7 +10,8 @@ const log = logger('@wdio/runner');
|
|
|
10
10
|
* @param {Object} caps desired session capabilities
|
|
11
11
|
* @return {Object} sanitized caps
|
|
12
12
|
*/
|
|
13
|
-
export function sanitizeCaps(
|
|
13
|
+
export function sanitizeCaps(capabilities, filterOut) {
|
|
14
|
+
const caps = 'alwaysMatch' in capabilities ? capabilities.alwaysMatch : capabilities;
|
|
14
15
|
const defaultConfigsKeys = [
|
|
15
16
|
// WDIO config keys
|
|
16
17
|
...Object.keys(DEFAULT_CONFIGS()),
|
|
@@ -38,7 +39,7 @@ export async function initializeInstance(config, capabilities, isMultiremote) {
|
|
|
38
39
|
/**
|
|
39
40
|
* check if config has sessionId and attach it to a running session if so
|
|
40
41
|
*/
|
|
41
|
-
if (config
|
|
42
|
+
if ('sessionId' in config) {
|
|
42
43
|
log.debug(`attach to session with id ${config.sessionId}`);
|
|
43
44
|
config.capabilities = sanitizeCaps(capabilities);
|
|
44
45
|
/**
|
|
@@ -54,6 +55,9 @@ export async function initializeInstance(config, capabilities, isMultiremote) {
|
|
|
54
55
|
const params = { ...config, ...connectionProps, capabilities };
|
|
55
56
|
return attach({ ...params, options: params });
|
|
56
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* start a normal standalone session
|
|
60
|
+
*/
|
|
57
61
|
if (!isMultiremote) {
|
|
58
62
|
log.debug('init remote session');
|
|
59
63
|
const sessionConfig = {
|
|
@@ -66,6 +70,9 @@ export async function initializeInstance(config, capabilities, isMultiremote) {
|
|
|
66
70
|
};
|
|
67
71
|
return remote(sessionConfig);
|
|
68
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* initiate multiremote sessions
|
|
75
|
+
*/
|
|
69
76
|
const options = {};
|
|
70
77
|
log.debug('init multiremote session');
|
|
71
78
|
// @ts-expect-error ToDo(Christian): can be removed?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/runner",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.321+63953a607",
|
|
4
4
|
"description": "A WebdriverIO service that runs tests in arbitrary environments",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-runner",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
"typeScriptVersion": "3.8.3",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@types/node": "^20.11.28",
|
|
33
|
-
"@wdio/config": "9.0.0-alpha.
|
|
34
|
-
"@wdio/globals": "9.0.0-alpha.
|
|
35
|
-
"@wdio/logger": "9.0.0-alpha.
|
|
36
|
-
"@wdio/types": "9.0.0-alpha.
|
|
37
|
-
"@wdio/utils": "9.0.0-alpha.
|
|
38
|
-
"deepmerge-ts": "^
|
|
33
|
+
"@wdio/config": "9.0.0-alpha.321+63953a607",
|
|
34
|
+
"@wdio/globals": "9.0.0-alpha.321+63953a607",
|
|
35
|
+
"@wdio/logger": "9.0.0-alpha.321+63953a607",
|
|
36
|
+
"@wdio/types": "9.0.0-alpha.321+63953a607",
|
|
37
|
+
"@wdio/utils": "9.0.0-alpha.321+63953a607",
|
|
38
|
+
"deepmerge-ts": "^7.0.3",
|
|
39
39
|
"expect-webdriverio": "^4.12.0",
|
|
40
40
|
"gaze": "^1.1.3",
|
|
41
|
-
"webdriver": "9.0.0-alpha.
|
|
42
|
-
"webdriverio": "9.0.0-alpha.
|
|
41
|
+
"webdriver": "9.0.0-alpha.321+63953a607",
|
|
42
|
+
"webdriverio": "9.0.0-alpha.321+63953a607"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "63953a6079023cb390a113fe5ce1c1b01b8e4bb6"
|
|
48
48
|
}
|