mediawiki-skins-MinervaNeue/tests/selenium/features/support/hooks.js
Edward Tadros 49c8c0f0e1 Selenium: Update WebdriverIO to version 6
Bug: T255447
Change-Id: I51daa462187983462d7f6529e5f76f47b21e5ef2
2020-07-13 07:38:36 -07:00

25 lines
683 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
*/
'use strict';
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
} );