screenshots: Remove unused beforeEach arg

Change-Id: I7e12438b030f90eefa29740d21555feb54f795ad
This commit is contained in:
Ed Sanders 2020-06-25 18:46:29 +01:00
parent b559b3adf5
commit 56b7844cce

View file

@ -8,7 +8,7 @@ const accessKey = process.env.SAUCE_ONDEMAND_ACCESS_KEY,
webdriver = require( 'selenium-webdriver' ),
TIMEOUT = 10 * 1000;
function createScreenshotEnvironment( test, beforeEach ) {
function createScreenshotEnvironment( test ) {
let clientSize, driver;
test.beforeEach( function () {
@ -45,18 +45,6 @@ function createScreenshotEnvironment( test, beforeEach ) {
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 () {