Browserstack Accessibility support with WebdriverIO 🚀 #11064
Browserstack Accessibility support with WebdriverIO 🚀 #11064christian-bromann merged 15 commits intowebdriverio:mainfrom
Conversation
|
@christian-bromann Request your review on the above PR created against v8. Once the review finishes for this PR, will create a PR against v7 also. Thanks! |
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
|
@christian-bromann Thanks for the quick review. Have resolved most of the review comments. |
| } | ||
|
|
||
| export function accessibilityResultsSummary() { | ||
| return ` |
There was a problem hiding this comment.
No need to return a string as it would remove all the code highlighting and prevents us from being able to test it. You can do this:
scripts.ts
export function accessibilityResultsSummary (paramA, paramB) {
return new Promise(...
// ...
}in your service file:
import { accessibilityResultsSummary } from './scripts.js'
// ...
await browser.execute(accessibilityResultsSummary, paramA, paramB)There was a problem hiding this comment.
@christian-bromann Could you please let me know, are you referring tests as lint tests or any other tests? Unit Tests don't seem to be feasible to test scripts. Any suggestions or thoughts here?
There was a problem hiding this comment.
Unit Tests don't seem to be feasible to test scripts
How so? Vitest allows running in JSDOM mode and we could even test the function in the browser using WebdriverIO itself 😉
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
|
|
||
| if (!this.shouldRunTestHooks(this._browser, this._accessibility)) { | ||
| return | ||
| } |
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
|
|
||
| if (!this.shouldRunTestHooks(this._browser, this._accessibility)) { | ||
| return | ||
| } |
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
packages/wdio-browserstack-service/src/accessibility-handler.ts
Outdated
Show resolved
Hide resolved
|
@christian-bromann Please check, have resolved most of the comments. |
|
@christian-bromann Thanks for releasing the changes. Are these changes good to be raised against for WebDriverIO v7 branch as well? |
|
Yes, but the v7 branch seems currently broken and I haven't had time to look into why. |
|
Okay, when running unit tests, encountered an error. Is this known test failure? - |
|
There is a known issue for this in the saucelabs dependency, we had to downgrade the saucelabs package version, see saucelabs/node-saucelabs#207. I think we have to do the same in v7 |
Proposed changes
BrowserStack Accessibility Automation Support to conduct accessibility testing on pre-existing test builds and generate health reports on BrowserStack
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers