@wdio/browserstack-service 9.36.2 → 9.38.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.
@@ -93,7 +93,7 @@ declare class _InsightsHandler {
93
93
  private getIntegrationsObject;
94
94
  private getIdentifier;
95
95
  setGitConfigPath(): Promise<void>;
96
- setTestData(test: Frameworks.Test, uuid: string): void;
96
+ setTestData(test: Frameworks.Test | ITestCaseHookParameter, uuid: string): void;
97
97
  }
98
98
  declare const InsightsHandler: typeof _InsightsHandler;
99
99
  type InsightsHandler = _InsightsHandler;
@@ -64,6 +64,18 @@ export default class BrowserstackService implements Services.ServiceInstance {
64
64
  beforeSuite(suite: Frameworks.Suite): Promise<void>;
65
65
  beforeHook(test: Frameworks.Test | CucumberHook, context: unknown): Promise<void>;
66
66
  afterHook(test: Frameworks.Test | CucumberHook, context: unknown, result: Frameworks.TestResult): Promise<void>;
67
+ /**
68
+ * Cucumber abandons the whole feature when a `BeforeAll` throws, so every scenario in it
69
+ * (Rule-nested included) is reported SKIPPED rather than vanishing. Ports
70
+ * `insights-handler.processCucumberHook`, whose cascade publishes over the legacy HTTP
71
+ * listener and is inert once the binary is up.
72
+ *
73
+ * Sent straight to TestHub rather than via `framework.trackEvent()`: legacy called
74
+ * `listener.testFinished()` directly, so routing these through the observers would rename the
75
+ * session, stop accessibility and run a Percy teardown per skipped row — none of which legacy
76
+ * does.
77
+ */
78
+ private _reportCucumberScenariosSkipped;
67
79
  beforeTest(test: Frameworks.Test): Promise<void>;
68
80
  afterTest(originalTest: Frameworks.Test, context: never, results: Frameworks.TestResult): Promise<void>;
69
81
  /**
@@ -93,6 +105,32 @@ export default class BrowserstackService implements Services.ServiceInstance {
93
105
  * For CucumberJS
94
106
  */
95
107
  beforeFeature(uri: string, feature: Feature): Promise<void>;
108
+ /**
109
+ * The CLI test framework, only when it is the cucumber one and the CLI is actually running.
110
+ * Returns null on the legacy flow and on any startup race, so every call site degrades to the
111
+ * classic handlers instead of throwing inside an awaited WDIO hook.
112
+ */
113
+ private _cliCucumberFramework;
114
+ /**
115
+ * A `Frameworks.Test`-shaped view of a scenario, for the cli/modules that read `args.test`.
116
+ *
117
+ * `fullName` is set deliberately. automateModule's session naming is SHAPE-keyed
118
+ * (`else if (test && !test.fullName)`), so leaving it unset drops the scenario into the mocha
119
+ * arm and names the session `<feature> - <scenario>`; legacy names the session after the
120
+ * feature alone, which is what the populated `fullName` preserves.
121
+ */
122
+ private _cucumberTestView;
123
+ /**
124
+ * A `Frameworks.TestResult`-shaped view of a scenario result, for automateModule's
125
+ * session-status marking.
126
+ *
127
+ * Which statuses count as a session failure is `_failureStatuses`, NOT the passed/failed
128
+ * collapse the o11y result applies: cucumber's UNDEFINED / AMBIGUOUS / UNKNOWN fail the
129
+ * session on legacy while still being reported to Observability as `skipped`, and PENDING
130
+ * joins them only under `cucumberOpts.strict`. Reading the o11y collapse here instead marked
131
+ * a feature with an undefined step `passed` where legacy marks it `failed`.
132
+ */
133
+ private _cucumberTestResult;
96
134
  /**
97
135
  * Runs before a Cucumber Scenario.
98
136
  * @param world world object containing information on pickle and test step
package/build/util.d.ts CHANGED
@@ -272,6 +272,13 @@ export declare function createDir(dir: string): void;
272
272
  export declare function isWritable(dirPath: string): boolean;
273
273
  export declare function setReadWriteAccess(dirPath: string): void;
274
274
  export declare function getMochaTestHierarchy(test: Frameworks.Test): string[];
275
+ /**
276
+ * Mocha and Jasmine have no tag construct, so `@tag` tokens written into the suite and
277
+ * test titles are the tag source. The leading `@` is kept so these match the pickle tags
278
+ * the Cucumber path in this service already forwards; note the node SDK strips it for
279
+ * Jest/Playwright, so the two SDKs emit different shapes for the same logical tag.
280
+ */
281
+ export declare function getTestTags(test: Frameworks.Test, scopes?: string[]): string[];
275
282
  /**
276
283
  * True only for the hub-interpreted `browserstack_executor: {…}` magic string.
277
284
  * Anchored to the start (leading whitespace tolerated) and case-sensitive, matching
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browserstack-service",
3
- "version": "9.36.2",
3
+ "version": "9.38.0",
4
4
  "description": "WebdriverIO service for better Browserstack integration",
5
5
  "author": "BrowserStack <support@browserstack.com>",
6
6
  "homepage": "https://github.com/browserstack/wdio-browserstack-service",
@@ -58,7 +58,11 @@
58
58
  "@grpc/grpc-js": "~1.13.5",
59
59
  "@percy/appium-app": "^2.0.9",
60
60
  "@percy/selenium-webdriver": "^2.2.2",
61
+ "@percy/webdriverio": ">=3.3.0 <3.3.3",
61
62
  "@types/gitconfiglocal": "^2.0.1",
63
+ "@wdio/logger": "^9.0.0",
64
+ "@wdio/reporter": "^9.0.0",
65
+ "@wdio/types": "^9.0.0",
62
66
  "browserstack-local": "^1.5.1",
63
67
  "chalk": "^5.3.0",
64
68
  "csv-writer": "^1.6.0",
@@ -68,12 +72,9 @@
68
72
  "tar": "^7.5.11",
69
73
  "undici": "^6.24.0",
70
74
  "uuid": "^11.1.0",
75
+ "webdriverio": "^9.0.0",
71
76
  "winston-transport": "^4.5.0",
72
- "yauzl": "^3.4.0",
73
- "@wdio/logger": "^9.0.0",
74
- "@wdio/reporter": "^9.0.0",
75
- "@wdio/types": "^9.0.0",
76
- "webdriverio": "^9.0.0"
77
+ "yauzl": "^3.4.0"
77
78
  },
78
79
  "peerDependencies": {
79
80
  "@wdio/cli": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0"