@wdio/cucumber-framework 8.18.2 → 8.20.0

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.
@@ -1,22 +1,2 @@
1
- declare const After: any, AfterAll: any, AfterStep: any, Before: any, BeforeAll: any, BeforeStep: any, Given: any, When: any, Then: any, DataTable: any, World: any, setDefaultTimeout: any, setDefinitionFunctionWrapper: any, setWorldConstructor: any, defineParameterType: any, defineStep: any;
2
- declare const adapterFactory: {
3
- init: (...args: any[]) => Promise<import("../index.js").CucumberAdapter>;
4
- After: any;
5
- AfterAll: any;
6
- AfterStep: any;
7
- Before: any;
8
- BeforeAll: any;
9
- BeforeStep: any;
10
- Given: any;
11
- When: any;
12
- Then: any;
13
- DataTable: any;
14
- World: any;
15
- setDefaultTimeout: any;
16
- setDefinitionFunctionWrapper: any;
17
- setWorldConstructor: any;
18
- defineParameterType: any;
19
- defineStep: any;
20
- publishCucumberReport: (cucumberMessageDir: string) => Promise<void>;
21
- };
1
+ export {};
22
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cjs/index.ts"],"names":[],"mappings":"AAAA,QAAA,MACI,KAAK,OACL,QAAQ,OACR,SAAS,OAET,MAAM,OACN,SAAS,OACT,UAAU,OAEV,KAAK,OACL,IAAI,OACJ,IAAI,OAEJ,SAAS,OAET,KAAK,OAEL,iBAAiB,OACjB,4BAA4B,OAC5B,mBAAmB,OACnB,mBAAmB,OACnB,UAAU,KAEmB,CAAA;AAEjC,QAAA,MAAM,cAAc;oBACqC,GAAG,EAAE;;;;;;;;;;;;;;;;;gDA6BC,MAAM;CAIpE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cjs/index.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  const { After, AfterAll, AfterStep, Before, BeforeAll, BeforeStep, Given, When, Then, DataTable, World, setDefaultTimeout, setDefinitionFunctionWrapper, setWorldConstructor, defineParameterType, defineStep } = require('@cucumber/cucumber');
3
4
  const adapterFactory = {
4
5
  init: async function initCucumberFramework(...args) {
package/build/index.d.ts CHANGED
@@ -1,13 +1,11 @@
1
- /// <reference types="node" />
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import { EventEmitter } from 'node:events';
3
- import * as Cucumber from '@cucumber/cucumber';
4
- import type { CucumberOptions, HookFunctionExtension as HookFunctionExtensionImport } from './types.js';
5
- import type { GherkinDocument } from '@cucumber/messages';
6
3
  import type { Capabilities, Options } from '@wdio/types';
7
- import type { SupportCodeLibraryBuilder } from '@cucumber/cucumber/lib/support_code_library_builder/index.js';
8
- import { DataTable, World } from '@cucumber/cucumber';
4
+ import { After, AfterAll, AfterStep, Before, BeforeAll, BeforeStep, Given, When, Then, setDefaultTimeout, setDefinitionFunctionWrapper, setWorldConstructor, defineParameterType, defineStep, DataTable, World } from '@cucumber/cucumber';
5
+ import type { GherkinDocument } from '@cucumber/messages';
6
+ import type Cucumber from '@cucumber/cucumber';
7
+ import type { CucumberOptions, HookFunctionExtension as HookFunctionExtensionImport } from './types.js';
9
8
  export declare const FILE_PROTOCOL = "file://";
10
- declare const After: (<WorldType = Cucumber.IWorld<any>>(code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestCaseHookFunction<WorldType>) => void) & (<WorldType_1 = Cucumber.IWorld<any>>(tags: string, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestCaseHookFunction<WorldType_1>) => void) & (<WorldType_2 = Cucumber.IWorld<any>>(options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineTestCaseHookOptions, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestCaseHookFunction<WorldType_2>) => void), AfterAll: ((code: Function) => void) & ((options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineTestRunHookOptions, code: Function) => void), AfterStep: (<WorldType = Cucumber.IWorld<any>>(code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestStepHookFunction<WorldType>) => void) & (<WorldType_1 = Cucumber.IWorld<any>>(tags: string, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestStepHookFunction<WorldType_1>) => void) & (<WorldType_2 = Cucumber.IWorld<any>>(options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineTestStepHookOptions, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestStepHookFunction<WorldType_2>) => void), Before: (<WorldType = Cucumber.IWorld<any>>(code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestCaseHookFunction<WorldType>) => void) & (<WorldType_1 = Cucumber.IWorld<any>>(tags: string, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestCaseHookFunction<WorldType_1>) => void) & (<WorldType_2 = Cucumber.IWorld<any>>(options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineTestCaseHookOptions, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestCaseHookFunction<WorldType_2>) => void), BeforeAll: ((code: Function) => void) & ((options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineTestRunHookOptions, code: Function) => void), BeforeStep: (<WorldType = Cucumber.IWorld<any>>(code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestStepHookFunction<WorldType>) => void) & (<WorldType_1 = Cucumber.IWorld<any>>(tags: string, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestStepHookFunction<WorldType_1>) => void) & (<WorldType_2 = Cucumber.IWorld<any>>(options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineTestStepHookOptions, code: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").TestStepHookFunction<WorldType_2>) => void), Given: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineStep, When: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineStep, Then: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineStep, setDefaultTimeout: (milliseconds: number) => void, setDefinitionFunctionWrapper: (fn: Function) => void, setWorldConstructor: (fn: any) => void, defineParameterType: (options: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IParameterTypeDefinition<any>) => void, defineStep: import("@cucumber/cucumber/lib/support_code_library_builder/types.js").IDefineStep;
11
9
  declare class CucumberAdapter {
12
10
  private _cid;
13
11
  private _config;
@@ -46,7 +44,7 @@ declare class CucumberAdapter {
46
44
  * set `beforeFeature`, `afterFeature`, `beforeScenario`, `afterScenario`, 'beforeStep', 'afterStep'
47
45
  * @param {object} config config
48
46
  */
49
- addWdioHooksAndWrapSteps(config: Options.Testrunner, supportCodeLibraryBuilder: SupportCodeLibraryBuilder): void;
47
+ addWdioHooksAndWrapSteps(config: Options.Testrunner, supportCodeLibraryBuilder: typeof Cucumber.supportCodeLibraryBuilder): void;
50
48
  }
51
49
  /**
52
50
  * Publishes a Cucumber report to a specified URL using NDJSON files from a directory.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAS1C,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAO9C,OAAO,KAAK,EACR,eAAe,EACf,qBAAqB,IAAI,2BAA2B,EAEvD,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAc,MAAM,aAAa,CAAA;AAUpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8DAA8D,CAAA;AAE7G,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,oBAAoB,CAAA;AAE7D,eAAO,MAAM,aAAa,YAAY,CAAA;AAItC,QAAA,MACI,KAAK,0lBACL,QAAQ,sKACR,SAAS,0lBAET,MAAM,0lBACN,SAAS,sKACT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D;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,uBAA8B,MAAM,KAAG,QAAQ,IAAI,CAmC7E,CAAA;AAGD,QAAA,MAAM,cAAc,EAAE;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAO,CAAA;AAa9C,eAAe,cAAc,CAAA;AAC7B,OAAO,EACH,eAAe,EACf,cAAc,EAEd,KAAK,EACL,QAAQ,EACR,SAAS,EAET,MAAM,EACN,SAAS,EACT,UAAU,EAEV,KAAK,EACL,IAAI,EACJ,IAAI,EAEJ,SAAS,EAET,KAAK,EAEL,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EAEV,qBAAqB,EACxB,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,28 +1,25 @@
1
1
  import url from 'node:url';
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs';
4
+ import { readdir, readFile } from 'node:fs/promises';
4
5
  import { createRequire } from 'node:module';
5
6
  import { EventEmitter } from 'node:events';
6
7
  import { Writable } from 'node:stream';
7
- import logger from '@wdio/logger';
8
+ import got from 'got';
8
9
  import isGlob from 'is-glob';
9
10
  import { sync as globSync } from 'glob';
11
+ import logger from '@wdio/logger';
10
12
  import { executeHooksWithArgs } from '@wdio/utils';
11
- import got from 'got';
12
- import { readdir, readFile } from 'node:fs/promises';
13
- import * as Cucumber from '@cucumber/cucumber';
13
+ import { After, AfterAll, AfterStep, Before, BeforeAll, BeforeStep, Given, When, Then, setDefaultTimeout, setDefinitionFunctionWrapper, supportCodeLibraryBuilder, setWorldConstructor, defineParameterType, defineStep, DataTable, World, Status } from '@cucumber/cucumber';
14
14
  import Gherkin from '@cucumber/gherkin';
15
15
  import { IdGenerator } from '@cucumber/messages';
16
+ import { loadConfiguration, loadSources, runCucumber } from '@cucumber/cucumber/api';
16
17
  import { DEFAULT_OPTS } from './constants.js';
17
18
  import { generateSkipTagsFromCapabilities } from './utils.js';
18
- import { loadConfiguration, loadSources, runCucumber } from '@cucumber/cucumber/api';
19
- import { DataTable, World, Status } from '@cucumber/cucumber';
20
19
  export const FILE_PROTOCOL = 'file://';
21
- const log = logger('@wdio/cucumber-framework');
22
- const { After, AfterAll, AfterStep, Before, BeforeAll, BeforeStep, Given, When, Then, setDefaultTimeout, setDefinitionFunctionWrapper, setWorldConstructor, defineParameterType, defineStep, supportCodeLibraryBuilder, } = Cucumber;
23
20
  const uuidFn = IdGenerator.uuid();
21
+ const log = logger('@wdio/cucumber-framework');
24
22
  const require = createRequire(import.meta.url);
25
- const { incrementing } = IdGenerator;
26
23
  function getResultObject(world) {
27
24
  return {
28
25
  passed: world.result?.status === Status.PASSED ||
@@ -41,7 +38,7 @@ class CucumberAdapter {
41
38
  _generateSkipTags;
42
39
  _cucumberFormatter;
43
40
  _cwd = process.cwd();
44
- _newId = incrementing();
41
+ _newId = IdGenerator.incrementing();
45
42
  _cucumberOpts;
46
43
  _hasTests = true;
47
44
  gherkinParser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/cucumber-framework",
3
- "version": "8.18.2",
3
+ "version": "8.20.0",
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",
@@ -43,8 +43,8 @@
43
43
  "@cucumber/messages": "22.0.0",
44
44
  "@types/node": "^20.1.0",
45
45
  "@wdio/logger": "8.16.17",
46
- "@wdio/types": "8.17.0",
47
- "@wdio/utils": "8.18.2",
46
+ "@wdio/types": "8.20.0",
47
+ "@wdio/utils": "8.20.0",
48
48
  "glob": "^10.2.2",
49
49
  "got": "^13.0.0",
50
50
  "is-glob": "^4.0.0"
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "910c79f1640f0100e763a507fdcaee9e4f52560f"
58
+ "gitHead": "6aa9e33233a6abc832bb16d2e24aaaa382e206b6"
59
59
  }