Git Product home page Git Product logo

nice-digital / wdio-cucumber-steps Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 5.0 1.25 MB

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

JavaScript 57.36% TypeScript 42.64%
webdriverio cucumber bdd test-automation cucumberjs cucumber-js wdio wdio-cucumber-steps behavior-driven-development browser-testing

wdio-cucumber-steps's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wdio-cucumber-steps's Issues

Zero accessibility issues causes test to fail

Repro steps

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

Expected result

The test passes

Actual result

The test fails with "AssertionError: Found 0 accessibility errors on http://host:port/some-url: expected [] to equal []"

How to pass the World object to the steps definitions or implementation

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.