cucumber-chai-wd

0.2.3 • Public • Published

cucumber-chai-wd

Adapter for cucumber and chai to WebdriverJS just as Jasminewd is for Jasmine.

  • Wraps expactations in control flow to have calls in sequences

To use it, just load it in a support js of cucumber:

module.exports = function cucumberChai() {
    // instruments cucumber with cucumber chai wd
    require('cucumber-chai-wd').use(this);
 
}

Or with optional chai modules:

module.exports = function cucumberChai() {
    // load chai with optional modules
    var chai = chai = require('chai');
    chai.use(require('chai-string'));
 
    // instruments cucumber with cucumber chai wd
    this.chai = chai;
    require('cucumber-chai-wd').use(this);
 
}

This will expose expect as a global function that will wrap any expectation in the control flow.

This will also override the cucumber step definition to wrap there execution in controll flow so that step will wait until every expectation is fullfilled in the control flow

Package Sidebar

Install

npm i cucumber-chai-wd

Weekly Downloads

1

Version

0.2.3

License

ISC

Last publish

Collaborators

  • sebsorin