cucumber.usesteps
v0.0.9
Published
Cucumber use/reuse steps
Downloads
25
Maintainers
Readme
//features/signin.usefeature
Scenario: I sign in as "user-1" with email "user1@user1"
Given I sign in as "user-1"
Then I should be signed in
Then I should see message "user1@user1"
//DevelopmentAuth.feature
Scenario: I want to sign in as "user-1" with included steps
Given I sign in as "user-1" with email "user1@user1": use steps "features/signin.usefeature"
Scenario: I want to sign in as "user-2" with included steps
Given I sign in as "user-2" with email "user2@user2": use steps "features/signin.usefeature"
// world.js
var uze = require('cucumber.usesteps');
uze.setSilent(false);
uze.setRootDir(__dirname + '/../');
//features/support/Auth.js
module.exports = function () {
// just share steps
require('cucumber.usesteps').share(this);
this.Given(/^I am on the home page$/, function (callback) {
this.iVisit('/', callback);
});
// ....
}