diff options
Diffstat (limited to 'test/e2e/beta/helpers.js')
-rw-r--r-- | test/e2e/beta/helpers.js | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/test/e2e/beta/helpers.js b/test/e2e/beta/helpers.js index 31c41d8b7..5951ea79b 100644 --- a/test/e2e/beta/helpers.js +++ b/test/e2e/beta/helpers.js @@ -1,12 +1,8 @@ -const fs = require('fs') -const mkdirp = require('mkdirp') -const pify = require('pify') -const {until} = require('selenium-webdriver') +const { until } = require('selenium-webdriver') module.exports = { checkBrowserForConsoleErrors, loadExtension, - verboseReportOnFailure, findElement, findElements, } @@ -42,21 +38,6 @@ async function checkBrowserForConsoleErrors (driver) { return errorObjects.filter(entry => !ignoredErrorMessages.some(message => entry.message.includes(message))) } -async function verboseReportOnFailure (driver, test) { - let artifactDir - if (process.env.SELENIUM_BROWSER === 'chrome') { - artifactDir = `./test-artifacts/chrome/${test.title}` - } else if (process.env.SELENIUM_BROWSER === 'firefox') { - artifactDir = `./test-artifacts/firefox/${test.title}` - } - const filepathBase = `${artifactDir}/test-failure` - await pify(mkdirp)(artifactDir) - const screenshot = await driver.takeScreenshot() - await pify(fs.writeFile)(`${filepathBase}-screenshot.png`, screenshot, { encoding: 'base64' }) - const htmlSource = await driver.getPageSource() - await pify(fs.writeFile)(`${filepathBase}-dom.html`, htmlSource) -} - async function findElement (driver, by, timeout = 10000) { return driver.wait(until.elementLocated(by), timeout) } |