fe-cucumber-manager
v0.0.5
Published
A Manager for composing reusable cucumber components
Downloads
4
Maintainers
Readme
fe-cucumber-manager
Api
Manager
Main class
Examples
var CucumberManager = require('fe-cucumber-manager');
// test/e2e/steps/steps.js
module.exports = function () {
CucumberManager
.api(this)
.constants([
require('fe-nightwatch-cucumber/constants'),
require('./constants'),
])
.selectors([
require('fe-nightwatch-cucumber/selectors/forms'),
require('./selectors/forms.custom'),
...
])
.phrases([
require('fe-nightwatch-cucumber/phrases/forms'),
require('./phrases/forms.custom'),
...
]);
}
Returns Manager
api
Sets the nightwatch api
Parameters
thing
Nightwatch the nightwatch client api object.
Returns Manager
selectors
Load up selector generators
Parameters
sources
Array objects containing selector factories
Returns Manager
constants
Load up sources of constants.
Parameters
sources
Array objects containing constants.
Returns Manager
store
Set some initial values in the Global value store.
Is just an object-path object, having all the methods provided by that package.
Parameters
Examples
var CucumberManager = require('fe-cucumber-manager');
// test/e2e/steps/steps.js
module.exports = function () {
CucumberManager
.store('foo', {
some: {
thing: {
deep: {
and: "meaningful"
}
}
}
});
}
CucumberManager.Store.get('foo.some.thing.deep');
// {and: 'meaningful'}
Returns Manager
phrases
Instantiate phrases
Parameters
sources
Array List of factories that generate valid Cucumber.js steps.
Returns Manager
escapeXpathString
Formats a string for usage inside an Xpath query.
Parameters
str
String
Returns String
formatSelector
Sugar for [...].join('')
Returns String
reduceMerge
Simple object merge function, overwrites existing properties.
Parameters
Returns Void