mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
screenshots: Remove unused beforeEach arg
Change-Id: I7e12438b030f90eefa29740d21555feb54f795ad
This commit is contained in:
parent
b559b3adf5
commit
56b7844cce
|
@ -8,7 +8,7 @@ const accessKey = process.env.SAUCE_ONDEMAND_ACCESS_KEY,
|
||||||
webdriver = require( 'selenium-webdriver' ),
|
webdriver = require( 'selenium-webdriver' ),
|
||||||
TIMEOUT = 10 * 1000;
|
TIMEOUT = 10 * 1000;
|
||||||
|
|
||||||
function createScreenshotEnvironment( test, beforeEach ) {
|
function createScreenshotEnvironment( test ) {
|
||||||
let clientSize, driver;
|
let clientSize, driver;
|
||||||
|
|
||||||
test.beforeEach( function () {
|
test.beforeEach( function () {
|
||||||
|
@ -45,18 +45,6 @@ function createScreenshotEnvironment( test, beforeEach ) {
|
||||||
console.error( e.message );
|
console.error( e.message );
|
||||||
} )
|
} )
|
||||||
);
|
);
|
||||||
if ( beforeEach ) {
|
|
||||||
driver.manage().timeouts().setScriptTimeout( TIMEOUT );
|
|
||||||
driver.wait(
|
|
||||||
driver.executeAsyncScript( beforeEach ).then(
|
|
||||||
function () {},
|
|
||||||
function ( e ) {
|
|
||||||
// Log error (timeout)
|
|
||||||
console.error( e.message );
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test.afterEach( function () {
|
test.afterEach( function () {
|
||||||
|
|
Loading…
Reference in a new issue