@wdio/cucumber-framework 9.2.8 → 9.3.1
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/cucumberFormatter.d.ts.map +1 -1
- package/build/cucumberFormatter.js +37 -34
- package/build/index.d.ts +4 -5
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -31
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cucumberFormatter.d.ts","sourceRoot":"","sources":["../src/cucumberFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAU,MAAM,oBAAoB,CAAA;AAQtD,OAAO,KAAK,EAER,eAAe,EAEf,OAAO,EACP,MAAM,EAEN,UAAU,EACV,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,cAAc,EAEd,IAAI,EACP,MAAM,oBAAoB,CAAA;AAY3B,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,YAAY,CAAA;AAE9D,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS;IACpD,OAAO,CAAC,iBAAiB,CAAwB;IACjD,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,gBAAgB,CAAC,CAAiB;IAC1C,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,WAAW,CAAoC;IACvD,OAAO,CAAC,gBAAgB,CAAe;IAEvC,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,qBAAqB,C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AO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,cAAc;IA2F1B,iBAAiB,CAAC,eAAe,EAAE,eAAe;IASlD,MAAM,CAAC,SAAS,EAAE,IAAI;IAItB,gBAAgB;IAsBhB,gBAAgB,CAAC,WAAW,EAAE,MAAM;IAQpC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ;IAIrC,iBAAiB,CAAC,QAAQ,EAAE,eAAe;IAwG3C,iBAAiB,CAAC,oBAAoB,EAAE,eAAe;IAiDvD,kBAAkB,CAAC,qBAAqB,EAAE,gBAAgB;IAoD1D,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE;IAyC5C,iBAAiB;CA2CpB"}
|
|
@@ -266,8 +266,6 @@ var CucumberFormatter = class extends Formatter {
|
|
|
266
266
|
this.failedCount++;
|
|
267
267
|
error = new Error(result.message?.split("\n")[0]);
|
|
268
268
|
error.stack = result.message;
|
|
269
|
-
} else if (result.willBeRetried) {
|
|
270
|
-
state = "retry";
|
|
271
269
|
}
|
|
272
270
|
const common = {
|
|
273
271
|
title,
|
|
@@ -392,6 +390,10 @@ var CucumberFormatter = class extends Formatter {
|
|
|
392
390
|
tags: reporterScenario.tags,
|
|
393
391
|
rule: reporterScenario.rule
|
|
394
392
|
};
|
|
393
|
+
const isRetry = typeof testcase.attempt === "number" && testcase.attempt > 0;
|
|
394
|
+
if (!this.scenarioLevelReporter && isRetry) {
|
|
395
|
+
return this.emit("suite:retry", payload);
|
|
396
|
+
}
|
|
395
397
|
this.emit(this.scenarioLevelReporter ? "test:start" : "suite:start", payload);
|
|
396
398
|
}
|
|
397
399
|
onTestStepStarted(testStepStartedEvent) {
|
|
@@ -431,38 +433,32 @@ var CucumberFormatter = class extends Formatter {
|
|
|
431
433
|
}
|
|
432
434
|
}
|
|
433
435
|
onTestStepFinished(testStepFinishedEvent) {
|
|
434
|
-
if (
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
scenario,
|
|
461
|
-
step,
|
|
462
|
-
result
|
|
463
|
-
);
|
|
464
|
-
}
|
|
465
|
-
return this.afterTest(
|
|
436
|
+
if (this.scenarioLevelReporter) {
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
const testcase = this._testCases.find(
|
|
440
|
+
(testcase2) => testcase2.id === this._currentTestCase?.testCaseId
|
|
441
|
+
);
|
|
442
|
+
const scenario = this._scenarios.find(
|
|
443
|
+
(sc) => sc.id === this._suiteMap.get(testcase?.pickleId)
|
|
444
|
+
);
|
|
445
|
+
const teststep = testcase?.testSteps?.find(
|
|
446
|
+
(step2) => step2.id === testStepFinishedEvent.testStepId
|
|
447
|
+
);
|
|
448
|
+
const step = scenario?.steps?.find((s) => s.id === teststep?.pickleStepId) || teststep;
|
|
449
|
+
const result = testStepFinishedEvent.testStepResult;
|
|
450
|
+
const doc = this._gherkinDocEvents.find(
|
|
451
|
+
(gde) => gde.uri === scenario?.uri
|
|
452
|
+
);
|
|
453
|
+
const uri = doc?.uri;
|
|
454
|
+
const feature = doc?.feature;
|
|
455
|
+
if (!step) {
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
delete this._currentPickle;
|
|
459
|
+
const type = getStepType(step);
|
|
460
|
+
if (type === "hook") {
|
|
461
|
+
return this.afterHook(
|
|
466
462
|
uri,
|
|
467
463
|
feature,
|
|
468
464
|
scenario,
|
|
@@ -470,6 +466,13 @@ var CucumberFormatter = class extends Formatter {
|
|
|
470
466
|
result
|
|
471
467
|
);
|
|
472
468
|
}
|
|
469
|
+
return this.afterTest(
|
|
470
|
+
uri,
|
|
471
|
+
feature,
|
|
472
|
+
scenario,
|
|
473
|
+
step,
|
|
474
|
+
result
|
|
475
|
+
);
|
|
473
476
|
}
|
|
474
477
|
onTestCaseFinished(results) {
|
|
475
478
|
const tc = this._testCases.find(
|
package/build/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import type { Capabilities, Options } from '@wdio/types';
|
|
3
|
-
import { After, AfterAll, AfterStep, Before, BeforeAll, BeforeStep, Given, When, Then, setDefaultTimeout, setDefinitionFunctionWrapper, setWorldConstructor, defineParameterType, defineStep, DataTable, World } from '@cucumber/cucumber';
|
|
4
3
|
import type { GherkinDocument } from '@cucumber/messages';
|
|
5
4
|
import type Cucumber from '@cucumber/cucumber';
|
|
6
5
|
import type { CucumberOptions, HookFunctionExtension as HookFunctionExtensionImport, StepDefinitionOptions } from './types.js';
|
|
7
6
|
export declare const FILE_PROTOCOL = "file://";
|
|
8
|
-
declare class CucumberAdapter {
|
|
7
|
+
export declare class CucumberAdapter {
|
|
9
8
|
private _cid;
|
|
10
9
|
private _config;
|
|
11
10
|
private _specs;
|
|
@@ -69,12 +68,12 @@ declare class CucumberAdapter {
|
|
|
69
68
|
* @returns {Promise<void>} - A Promise that resolves when the report is successfully published.
|
|
70
69
|
* @throws {Error} - Throws an error if there are issues with file reading or the publishing process.
|
|
71
70
|
*/
|
|
72
|
-
declare const publishCucumberReport: (cucumberMessageDir: string) => Promise<void>;
|
|
73
|
-
declare const adapterFactory: {
|
|
71
|
+
export declare const publishCucumberReport: (cucumberMessageDir: string) => Promise<void>;
|
|
72
|
+
export declare const adapterFactory: {
|
|
74
73
|
init?: Function;
|
|
75
74
|
};
|
|
76
75
|
export default adapterFactory;
|
|
77
|
-
export
|
|
76
|
+
export * from '@cucumber/cucumber';
|
|
78
77
|
declare global {
|
|
79
78
|
namespace WebdriverIO {
|
|
80
79
|
interface CucumberOpts extends CucumberOptions {
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ1C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAc,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ1C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAc,MAAM,aAAa,CAAA;AAUpE,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAM9C,OAAO,KAAK,EACR,eAAe,EACf,qBAAqB,IAAI,2BAA2B,EACpD,qBAAqB,EACxB,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,aAAa,YAAY,CAAA;AAmBtC,qBAAa,eAAe;IAUpB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,kBAAkB;IAhB9B,OAAO,CAAC,IAAI,CAAgB;IAC5B,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,aAAa,CAA2B;IAEhD,OAAO,CAAC,SAAS,CAAO;IAExB,OAAO,CAAC,aAAa,CAAqC;gBAG9C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,CAAC,UAAU,EAC3B,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,YAAY,CAAC,8BAA8B,EAC1D,SAAS,EAAE,YAAY,EACvB,aAAa,EAAE,YAAY,E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UAAU,YAAa,SAAQ,eAAe;SAAG;QACjD,UAAU,qBAAsB,SAAQ,2BAA2B;SAAG;KACzE;CACJ"}
|
package/build/index.js
CHANGED
|
@@ -12,23 +12,9 @@ import { sync as globSync } from "glob";
|
|
|
12
12
|
import logger2 from "@wdio/logger";
|
|
13
13
|
import { executeHooksWithArgs, testFnWrapper } from "@wdio/utils";
|
|
14
14
|
import {
|
|
15
|
-
After,
|
|
16
|
-
AfterAll,
|
|
17
|
-
AfterStep,
|
|
18
|
-
Before,
|
|
19
|
-
BeforeAll,
|
|
20
|
-
BeforeStep,
|
|
21
|
-
Given,
|
|
22
|
-
When,
|
|
23
|
-
Then,
|
|
24
15
|
setDefaultTimeout,
|
|
25
16
|
setDefinitionFunctionWrapper,
|
|
26
17
|
supportCodeLibraryBuilder,
|
|
27
|
-
setWorldConstructor,
|
|
28
|
-
defineParameterType,
|
|
29
|
-
defineStep,
|
|
30
|
-
DataTable,
|
|
31
|
-
World,
|
|
32
18
|
Status
|
|
33
19
|
} from "@cucumber/cucumber";
|
|
34
20
|
import Gherkin from "@cucumber/gherkin";
|
|
@@ -130,6 +116,7 @@ function setUserHookNames(options) {
|
|
|
130
116
|
}
|
|
131
117
|
|
|
132
118
|
// src/index.ts
|
|
119
|
+
export * from "@cucumber/cucumber";
|
|
133
120
|
var FILE_PROTOCOL = "file://";
|
|
134
121
|
var uuidFn = IdGenerator.uuid();
|
|
135
122
|
var log2 = logger2("@wdio/cucumber-framework");
|
|
@@ -522,25 +509,9 @@ adapterFactory.init = async function(...args) {
|
|
|
522
509
|
};
|
|
523
510
|
var src_default = adapterFactory;
|
|
524
511
|
export {
|
|
525
|
-
After,
|
|
526
|
-
AfterAll,
|
|
527
|
-
AfterStep,
|
|
528
|
-
Before,
|
|
529
|
-
BeforeAll,
|
|
530
|
-
BeforeStep,
|
|
531
512
|
CucumberAdapter,
|
|
532
|
-
DataTable,
|
|
533
513
|
FILE_PROTOCOL,
|
|
534
|
-
Given,
|
|
535
|
-
Then,
|
|
536
|
-
When,
|
|
537
|
-
World,
|
|
538
514
|
adapterFactory,
|
|
539
515
|
src_default as default,
|
|
540
|
-
|
|
541
|
-
defineStep,
|
|
542
|
-
publishCucumberReport,
|
|
543
|
-
setDefaultTimeout,
|
|
544
|
-
setDefinitionFunctionWrapper,
|
|
545
|
-
setWorldConstructor
|
|
516
|
+
publishCucumberReport
|
|
546
517
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cucumber-framework",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.1",
|
|
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",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "9bc630ee3e0ca8a522896ddc2024baefaf38f6b3"
|
|
60
60
|
}
|