@wdio/cucumber-framework 8.16.6 → 8.16.9

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.
@@ -25,6 +25,7 @@ export default class CucumberFormatter extends Formatter {
25
25
  private _scenarioStart?;
26
26
  private _testStart?;
27
27
  constructor(options: IFormatterOptions);
28
+ normalizeURI(uri: string): string;
28
29
  emit(event: string, payload: any): void;
29
30
  usesSpecGrouping(): boolean;
30
31
  featureIsStarted(feature: string): boolean;
@@ -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;AAOtD,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;AAc3B,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,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AG,MAAM;IAS5C,SAAS,CACL,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,cAAc;IAsB1B,SAAS,CACL,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,cAAc;IA6F1B,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;IAgG3C,iBAAiB,CAAC,oBAAoB,EAAE,eAAe;IAiDvD,kBAAkB,CAAC,qBAAqB,EAAE,gBAAgB;IAkD1D,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE;IAyC5C,iBAAiB;CA2CpB"}
@@ -1,4 +1,5 @@
1
1
  import { Formatter, Status } from '@cucumber/cucumber';
2
+ import path from 'node:path';
2
3
  import logger from '@wdio/logger';
3
4
  const log = logger('CucumberFormatter');
4
5
  import { addKeywordToStep, getFeatureId, formatMessage, getRule, getStepType, buildStepPayload, getScenarioDescription } from './utils.js';
@@ -30,13 +31,13 @@ export default class CucumberFormatter extends Formatter {
30
31
  let results = [];
31
32
  options.eventBroadcaster.on('envelope', (envelope) => {
32
33
  if (envelope.gherkinDocument) {
33
- this.onGherkinDocument(envelope.gherkinDocument);
34
+ this.onGherkinDocument({ ...envelope.gherkinDocument, ...(envelope.gherkinDocument.uri ? { uri: this.normalizeURI(envelope.gherkinDocument.uri) } : {}) });
34
35
  }
35
36
  else if (envelope.testRunStarted) {
36
37
  this.onTestRunStarted();
37
38
  }
38
39
  else if (envelope.pickle) {
39
- this.onPickleAccepted(envelope.pickle);
40
+ this.onPickleAccepted({ ...envelope.pickle, uri: this.normalizeURI(envelope.pickle.uri) });
40
41
  }
41
42
  else if (envelope.testCase) {
42
43
  this.onTestCasePrepared(envelope.testCase);
@@ -80,6 +81,9 @@ export default class CucumberFormatter extends Formatter {
80
81
  this.ignoreUndefinedDefinitions = options.parsedArgvOptions._ignoreUndefinedDefinitions;
81
82
  this.failAmbiguousDefinitions = options.parsedArgvOptions._failAmbiguousDefinitions;
82
83
  }
84
+ normalizeURI(uri) {
85
+ return path.isAbsolute(uri) ? uri : path.resolve(uri);
86
+ }
83
87
  emit(event, payload) {
84
88
  const message = formatMessage({ payload });
85
89
  message.cid = this.cid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/cucumber-framework",
3
- "version": "8.16.6",
3
+ "version": "8.16.9",
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",
@@ -44,8 +44,8 @@
44
44
  "@cucumber/tag-expressions": "5.0.6",
45
45
  "@types/node": "^20.1.0",
46
46
  "@wdio/logger": "8.11.0",
47
- "@wdio/types": "8.16.3",
48
- "@wdio/utils": "8.16.3",
47
+ "@wdio/types": "8.16.7",
48
+ "@wdio/utils": "8.16.9",
49
49
  "glob": "^10.2.2",
50
50
  "is-glob": "^4.0.0"
51
51
  },
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "aa35c291fb496b80350766d674385ea7b4d1516a"
58
+ "gitHead": "a94335c7a66b9d4c792f0ae55a854f2c8b68e26d"
59
59
  }