Debian Codegraph @

skins/MinervaNeue/tests/selenium/features/support/world.js

raw symbols SCIP
1 /**
2 * World
3 *
4 * World is a function that is bound as `this` to each step of a scenario.
5 * It is reset for each scenario.
6 * https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/world.md
7 *
8 * Contrary to Cucumber.js best practices, this `MinervaWorld` is not being
9 * bound to scenarios with the `setWorldConstructor` like this:
10 *
11 * setWorldConstructor(MinervaWorld);
12 *
13 * Instead, it acts as a simple function that encapsulates all dependencies,
14 * and is exported so that it can be imported into each step definition file,
15 * allowing us to use the dependencies across scenarios.
16 */
17
18 'use strict';
19
20 const mwCorePages = require( '../support/pages/mw_core_pages' ),
21 minervaPages = require( '../support/pages/minerva_pages' );
22
23 function MinervaWorld() {
24 /* pageObjects */
25 Object.assign( this, mwCorePages );
26 Object.assign( this, minervaPages );
27 }
28
29 module.exports = new MinervaWorld();