Chore: Update the Cypress JS example with custom threshold validation…#587
Chore: Update the Cypress JS example with custom threshold validation…#587ash007ok wants to merge 1 commit intoGovTechSG:masterfrom
Conversation
… at the test level and capture a screenshot in Cypress to handle the session with a red highlighter
|
|
||
| Cypress.Commands.add("runOobeeA11yScan", (items = {}) => { | ||
| cy.window().then(async (win) => { | ||
| Cypress.Commands.add('runOobeeA11yScan', (items = {}, threshold = {}) => { |
There was a problem hiding this comment.
@ash007ok with your Cypress experience, do you think it is possible to make Oobee functions like these exposed as cypress keywords instead?
E.g. Can we have an equivalent of or extendnpmIndex for Cypress? Then users don't have to copy/paste the examples.
There was a problem hiding this comment.
To add on, the screenshots keywords can be for Playwright too
There was a problem hiding this comment.
@younglim That would be great! We can create a Cypress plugin like cypress-oobee to eliminate the copy/paste setup.
Guide to create plugins: https://docs.cypress.io/guides/tooling/plugins-guide
Plugin examples: https://docs.cypress.io/app/plugins/plugins-list
|
Implemented Cypress native screenshots function here |
… at the test level and capture a screenshot in Cypress to handle the session with a red highlighter
This PR adds...
package[-lock].jsonnpm audit, portable installation on GitHub Actions