@wdio/browserstack-service 9.34.1 → 9.35.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/README.md +8 -0
- package/build/accessibility-handler.d.ts +6 -0
- package/build/cleanup.js +3 -3
- package/build/cli/modules/accessibilityModule.d.ts +23 -2
- package/build/index.js +175 -17
- package/build/service.d.ts +46 -0
- package/package.json +2 -2
package/build/service.d.ts
CHANGED
|
@@ -43,6 +43,13 @@ export default class BrowserstackService implements Services.ServiceInstance {
|
|
|
43
43
|
private _percyCaptureMode;
|
|
44
44
|
private _percyHandler?;
|
|
45
45
|
private _turboScale;
|
|
46
|
+
/**
|
|
47
|
+
* Only mocha's own bail drops the rest of a spec. wdio's top-level `bail` is a launcher
|
|
48
|
+
* spec-scheduling filter (it stops queueing further specs once N runners have failed) and
|
|
49
|
+
* never reaches mocha, so under it every test in the current spec still runs — enumerating
|
|
50
|
+
* on it would report tests as skipped that are about to execute.
|
|
51
|
+
*/
|
|
52
|
+
private _mochaBail;
|
|
46
53
|
constructor(options: BrowserstackConfig & Options.Testrunner, _caps: Capabilities.ResolvedTestrunnerCapabilities, _config: Options.Testrunner);
|
|
47
54
|
_updateCaps(fn: (caps: WebdriverIO.Capabilities) => void): void;
|
|
48
55
|
beforeSession(config: Omit<Options.Testrunner, 'capabilities'>, capabilities: WebdriverIO.Capabilities): Promise<void>;
|
|
@@ -59,6 +66,28 @@ export default class BrowserstackService implements Services.ServiceInstance {
|
|
|
59
66
|
afterHook(test: Frameworks.Test | CucumberHook, context: unknown, result: Frameworks.TestResult): Promise<void>;
|
|
60
67
|
beforeTest(test: Frameworks.Test): Promise<void>;
|
|
61
68
|
afterTest(originalTest: Frameworks.Test, context: never, results: Frameworks.TestResult): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Whether this failure will be retried, in which case mocha has not dropped anything yet and
|
|
71
|
+
* the tests after it are still going to run.
|
|
72
|
+
*
|
|
73
|
+
* `results.retries` only tracks wdio's spec-file retries — `@wdio/utils` builds it as
|
|
74
|
+
* `{ attempts: 0, limit: repeatTest }` and `@wdio/mocha-framework` never feeds `mochaOpts.retries`
|
|
75
|
+
* into it, so under mocha-level retries it stays `{0, 0}` and tells us nothing. Read mocha's own
|
|
76
|
+
* runnable state for that case, otherwise the cascade fires on the first attempt and reports
|
|
77
|
+
* tests as skipped that the retry then actually runs.
|
|
78
|
+
*/
|
|
79
|
+
private hasRetryPending;
|
|
80
|
+
/**
|
|
81
|
+
* mocha's `bail` aborts the run on the first failure, so every test the spec had not reached
|
|
82
|
+
* yet is dropped without emitting any event and never appears on the dashboard. Report them
|
|
83
|
+
* as skipped — same cascade the failed-hook path uses, from the spec's root suite so sibling
|
|
84
|
+
* describes are covered too (bail kills the whole spec, not just the failing describe).
|
|
85
|
+
*
|
|
86
|
+
* The root can span more than one file when specs are grouped — `MochaAdapter` adds every spec
|
|
87
|
+
* it is handed to one mocha instance. Cascading across them is still correct: bail aborts that
|
|
88
|
+
* whole runner, so those tests do not run either.
|
|
89
|
+
*/
|
|
90
|
+
private reportBailSkippedTests;
|
|
62
91
|
after(result: number): Promise<void>;
|
|
63
92
|
/**
|
|
64
93
|
* For CucumberJS
|
|
@@ -72,6 +101,23 @@ export default class BrowserstackService implements Services.ServiceInstance {
|
|
|
72
101
|
afterScenario(world: ITestCaseHookParameter): Promise<void>;
|
|
73
102
|
beforeStep(step: Frameworks.PickleStep, scenario: Pickle): Promise<void>;
|
|
74
103
|
afterStep(step: Frameworks.PickleStep, scenario: Pickle, result: Frameworks.PickleResult): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Whether accessibility is being driven by the binary rather than the classic handler.
|
|
106
|
+
*
|
|
107
|
+
* Precisely: it decides whether the CLASSIC handler owns the session's accessibility state.
|
|
108
|
+
* It is the same condition that gates `AccessibilityHandler.before()` in the `before` hook, so
|
|
109
|
+
* keeping it in one place is what stops the two drifting.
|
|
110
|
+
*
|
|
111
|
+
* The two paths are not strictly exclusive. `AccessibilityModule` is registered on
|
|
112
|
+
* `startBinResponse.accessibility?.success` alone, independent of provider — `isNonBstackA11y`
|
|
113
|
+
* exists for exactly the turboscale / non-BrowserStack case — so with the binary up against a
|
|
114
|
+
* non-BrowserStack provider the module can hold real state AND the handler's `before()` will
|
|
115
|
+
* have run. Both then need migrating, which is what the caller does.
|
|
116
|
+
*
|
|
117
|
+
* `isRunning()` alone is NOT equivalent, and that is the trap: under a non-BrowserStack
|
|
118
|
+
* provider it is true while the classic handler is the one holding the live state.
|
|
119
|
+
*/
|
|
120
|
+
private _isCliAccessibilityFlow;
|
|
75
121
|
onReload(oldSessionId: string, newSessionId: string): Promise<void>;
|
|
76
122
|
_isAppAutomate(): boolean;
|
|
77
123
|
_updateJob(requestBody: unknown): Promise<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browserstack-service",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.35.1",
|
|
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@browserstack/ai-sdk-node": "1.5.17",
|
|
57
57
|
"@bufbuild/protobuf": "^2.5.2",
|
|
58
|
-
"@grpc/grpc-js": "1.13.
|
|
58
|
+
"@grpc/grpc-js": "~1.13.5",
|
|
59
59
|
"@percy/appium-app": "^2.0.9",
|
|
60
60
|
"@percy/selenium-webdriver": "^2.2.2",
|
|
61
61
|
"@types/gitconfiglocal": "^2.0.1",
|