mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-18 11:35:54 +00:00
26e413e04d
Porting first selenium test from Ruby to Node.js using the mocha framework. Starting with `category.feature` test. Tests are placed in a new `tests/selenium` folder with their own eslint config. Bug: T190710 Change-Id: Iad954405a5ae0608fd5dc90dd5dfa434b3781037
23 lines
668 B
JavaScript
23 lines
668 B
JavaScript
/**
|
|
* Hooks
|
|
*
|
|
* Hooks are used for setup and teardown of the environment before and after each scenario.
|
|
* It's preferable to use tags to invoke hooks rather than using the generic 'Before' and 'After'
|
|
* events, which execute before and after all scenario.
|
|
* https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/hooks.md
|
|
*/
|
|
|
|
const { After, Before } = require( 'cucumber' );
|
|
|
|
Before( function () {
|
|
// This hook will be executed before ALL scenarios
|
|
} );
|
|
|
|
After( function () {
|
|
// This hook will be executed after ALL scenarios
|
|
} );
|
|
|
|
Before( { tags: '@foo' }, function () {
|
|
// This hook will be executed before scenarios tagged with @foo
|
|
} );
|