-
Notifications
You must be signed in to change notification settings - Fork 9
fix(a11y): guard each overwriteCommand in the accessibility wrap loop [SDK-7452] #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v8
Are you sure you want to change the base?
Changes from all commits
f2ac7bf
355d1d5
5e8c8ff
2443f4d
f69e094
8de3c64
d08448f
3aaf831
f37ec83
ec9b48d
7985b7b
4444297
969aa7d
7c37126
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@wdio/browserstack-service": patch | ||
| --- | ||
|
|
||
| - Fixed accessibility command wrapping aborting on App Automate sessions, which logged `Error in onBeforeExecute` and left the remaining commands unwrapped for auto-scanning. Applies to both the CLI and the non-CLI flow. | ||
| - Accessibility results and summary failures now report the HTTP status, the response body and the identifiers the query used, instead of an empty result with no explanation. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,7 +247,11 @@ class _AccessibilityHandler { | |
| .filter((command) => command.name && command.class) | ||
| .forEach((command) => { | ||
| const browser = this._browser as WebdriverIO.Browser | ||
| browser.overwriteCommand(command.name, this.commandWrapper.bind(this, command), command.class === 'Element') | ||
| try { | ||
| browser.overwriteCommand(command.name, this.commandWrapper.bind(this, command), command.class === 'Element') | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning — the service-flow guard ships without the regression test its CLI-flow twin got. The guard itself is correct, to be clear: What's missing is the evidence. This is the mirror of the change to That asymmetry matters because of how this failure presents: the loop aborting on the first Selenium-shaped entry exits 0 and shows up only as silently unwrapped commands and zero accessibility scans. So the untested half is precisely the one that can regress unnoticed while the CLI half stays green in CI. Suggested fix — add the symmetric case to Capture and restore the original |
||
| } catch (error) { | ||
| BStackLogger.debug(`Exception in overwrite command ${command.name} - ${error}`) | ||
| } | ||
| }) | ||
|
|
||
| PerformanceTester.end(PERFORMANCE_SDK_EVENTS.CONFIG_EVENTS.ACCESSIBILITY) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.