fe-cucumber-manager

0.0.5 • Public • Published

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

  • key (String | Array) valid key for npm:object-path
  • value Any

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

Returns String

formatSelector

Sugar for [...].join('')

Returns String

reduceMerge

Simple object merge function, overwrites existing properties.

Parameters

  • source Object merge properties from
  • target Object merge properties into

Returns Void

Package Sidebar

Install

npm i fe-cucumber-manager

Weekly Downloads

1

Version

0.0.5

License

MIT

Last publish

Collaborators

  • fusion-npm