nice-digital / wdio-cucumber-steps Goto Github PK
View Code? Open in Web Editor NEWShared step definitions for Cucumber JS BDD tests in WebdriverIO
Home Page: https://www.npmjs.com/package/@nice-digital/wdio-cucumber-steps
License: MIT License
Shared step definitions for Cucumber JS BDD tests in WebdriverIO
Home Page: https://www.npmjs.com/package/@nice-digital/wdio-cucumber-steps
License: MIT License
Find a page with no accessibility issues and write a feature using the accessibility step definition using Axe, e.g.:
Scenario: Accessibility checking
Given I open the url "/some-url"
Then the page should have no accessibility issues
The test passes
The test fails with "AssertionError: Found 0 accessibility errors on http://host:port/some-url: expected [] to equal []"
In the accessibility tests, if they fail then they call fail
, which fails.
fail is not defined ReferenceError: fail is not defined at World.checkForAccessibilityIssues (/tests/node_modules/@nice-digital/wdio-cucumber-steps/src/support/check/checkForAccessibilityIssues.ts:85:3)
See
How to pass the world object to the step definitions or implementation
Given(/^I open the (url|site) "([^"]*)?"$/, openWebsite).withDocs(
"Open a site in the current browser window/tab"
).withExample('I open the url "https://www.app.com"');
export async function openWebsite(
scWorld: World,
type: "url" | "site",
page: string
): Promise<void> {
.
.
}
Following error is raised with the above code:
โ And I open the url "https://www.app.com"
Error: function uses multiple asynchronous interfaces: callback and promise
to use the callback interface: do not return a promise
to use the promise interface: remove the last argument to the function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.