@wdio/cucumber-framework 8.0.0-alpha.249 → 8.0.0-alpha.327
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/index.d.ts +1 -7
- package/build/index.d.ts.map +1 -1
- package/build/index.js +17 -5
- package/package.json +5 -6
package/build/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
3
|
import * as Cucumber from '@cucumber/cucumber';
|
|
4
4
|
import { After, AfterAll, AfterStep, Before, BeforeAll, BeforeStep, DataTable, defineParameterType, defineStep, Given, setDefaultTimeout, setDefinitionFunctionWrapper, setWorldConstructor, World, Then, When } from '@cucumber/cucumber';
|
|
5
|
-
import { Long } from 'long';
|
|
6
5
|
import type { Capabilities, Options } from '@wdio/types';
|
|
7
6
|
import type { CucumberOptions, StepDefinitionOptions, HookFunctionExtension as HookFunctionExtensionImport } from './types';
|
|
8
7
|
declare class CucumberAdapter {
|
|
@@ -20,12 +19,7 @@ declare class CucumberAdapter {
|
|
|
20
19
|
private _cucumberReporter;
|
|
21
20
|
private _eventDataCollector;
|
|
22
21
|
private _pickleFilter;
|
|
23
|
-
getHookParams
|
|
24
|
-
/**
|
|
25
|
-
* make sure TS loads `@types/long` otherwise it won't find it in `@cucumber/messages`
|
|
26
|
-
* see also https://github.com/cucumber/cucumber-js/issues/1491
|
|
27
|
-
*/
|
|
28
|
-
never?: Long;
|
|
22
|
+
private getHookParams?;
|
|
29
23
|
constructor(_cid: string, _config: Options.Testrunner, _specs: string[], _capabilities: Capabilities.RemoteCapability, _reporter: EventEmitter);
|
|
30
24
|
init(): Promise<this>;
|
|
31
25
|
hasTests(): boolean;
|
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":"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Aa;IAUP,aAAa;IAgCnB;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU;IAkDvC;;;OAGG;IACH,SAAS,CAAE,MAAM,EAAE,OAAO,CAAC,UAAU;IAwBrC;;;;;;;;;OASG;IACH,QAAQ,CACJ,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,CAAC,UAAU,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,qBAAqB,EAC9B,aAAa,EAAE,QAAQ,UAEA,cAAc,WAAW,GAAG,EAAE;CAkB5D;AAGD,QAAA,MAAM,cAAc,EAAE;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAO,CAAA;AAa9C,eAAe,cAAc,CAAA;AAC7B,OAAO,EACH,eAAe,EACf,cAAc,EACd,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,SAAS,EACT,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,KAAK,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,IAAI,EACJ,IAAI,EACJ,KAAK,EACR,CAAA;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,YAAa,SAAQ,eAAe;SAAG;QACjD,UAAU,qBAAsB,SAAQ,2BAA2B;SAAG;KACzE;CACJ"}
|
package/build/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import url from 'node:url';
|
|
1
2
|
import path from 'node:path';
|
|
2
3
|
import { createRequire } from 'node:module';
|
|
3
4
|
import { EventEmitter } from 'node:events';
|
|
@@ -37,8 +38,13 @@ class CucumberAdapter {
|
|
|
37
38
|
this._cucumberFeaturesWithLineNumbers = this._config.cucumberFeaturesWithLineNumbers || [];
|
|
38
39
|
this._eventBroadcaster = new EventEmitter();
|
|
39
40
|
this._eventDataCollector = new EventDataCollector(this._eventBroadcaster);
|
|
40
|
-
this._specs = this._specs.map((spec) => (
|
|
41
|
-
|
|
41
|
+
this._specs = this._specs.map((spec) => (
|
|
42
|
+
/**
|
|
43
|
+
* as Cucumber doesn't support file:// formats yet we have to
|
|
44
|
+
* remove it before adding it to Cucumber
|
|
45
|
+
*/
|
|
46
|
+
spec.startsWith(FILE_PROTOCOL)
|
|
47
|
+
? url.fileURLToPath(spec)
|
|
42
48
|
: spec));
|
|
43
49
|
const featurePathsToRun = this._cucumberFeaturesWithLineNumbers.length > 0
|
|
44
50
|
? this._cucumberFeaturesWithLineNumbers
|
|
@@ -179,10 +185,16 @@ class CucumberAdapter {
|
|
|
179
185
|
mockery.registerMock('@cucumber/cucumber', Cucumber);
|
|
180
186
|
await Promise.all(this.requiredFiles().map((codePath) => {
|
|
181
187
|
const filepath = path.isAbsolute(codePath)
|
|
182
|
-
? codePath
|
|
183
|
-
|
|
188
|
+
? codePath.startsWith(FILE_PROTOCOL)
|
|
189
|
+
? codePath
|
|
190
|
+
: url.pathToFileURL(codePath).href
|
|
191
|
+
: url.pathToFileURL(path.join(process.cwd(), codePath)).href;
|
|
184
192
|
// This allows rerunning a stepDefinitions file
|
|
185
|
-
|
|
193
|
+
const stepDefPath = url.pathToFileURL(require.resolve(url.fileURLToPath(filepath))).href;
|
|
194
|
+
const cacheEntryToDelete = Object.keys(require.cache).find((u) => url.pathToFileURL(u).href === stepDefPath);
|
|
195
|
+
if (cacheEntryToDelete) {
|
|
196
|
+
delete require.cache[cacheEntryToDelete];
|
|
197
|
+
}
|
|
186
198
|
return import(filepath);
|
|
187
199
|
}));
|
|
188
200
|
mockery.disable();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cucumber-framework",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.327+9e6d91918",
|
|
4
4
|
"description": "A WebdriverIO plugin. Adapter for Cucumber.js testing framework.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cucumber-framework",
|
|
@@ -31,11 +31,10 @@
|
|
|
31
31
|
"@cucumber/gherkin-streams": "^5.0.0",
|
|
32
32
|
"@cucumber/messages": "19.1.2",
|
|
33
33
|
"@types/is-glob": "^4.0.1",
|
|
34
|
-
"@types/long": "^4.0.1",
|
|
35
34
|
"@types/mockery": "^1.4.29",
|
|
36
|
-
"@wdio/logger": "8.0.0-alpha.
|
|
37
|
-
"@wdio/types": "8.0.0-alpha.
|
|
38
|
-
"@wdio/utils": "8.0.0-alpha.
|
|
35
|
+
"@wdio/logger": "8.0.0-alpha.327+9e6d91918",
|
|
36
|
+
"@wdio/types": "8.0.0-alpha.327+9e6d91918",
|
|
37
|
+
"@wdio/utils": "8.0.0-alpha.327+9e6d91918",
|
|
39
38
|
"glob": "^8.0.3",
|
|
40
39
|
"is-glob": "^4.0.0",
|
|
41
40
|
"long": "^4.0.0",
|
|
@@ -47,5 +46,5 @@
|
|
|
47
46
|
"publishConfig": {
|
|
48
47
|
"access": "public"
|
|
49
48
|
},
|
|
50
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "9e6d919187b099126ba2dae802791c659fc9c794"
|
|
51
50
|
}
|