Commit 44bb646a authored by jwzimmer's avatar jwzimmer

removed redundant require statements

parent 79499b67
......@@ -4,17 +4,16 @@
* Test cases: https://github.com/LLK/scratch-www/wiki/Most-Important-Workflows
*/
require('chromedriver');
var tap = require('tap');
var seleniumWebdriver = require('selenium-webdriver');
// Selenium's promise driver will be deprecated, so we should not rely on it
seleniumWebdriver.SELENIUM_PROMISE_MANAGER=0;
const {
driver
driver,
webdriver
} = require('../../helpers/selenium-helpers.js');
// Selenium's promise driver will be deprecated, so we should not rely on it
webdriver.SELENIUM_PROMISE_MANAGER=0;
var rootUrl = process.env.ROOT_URL || 'https://scratch.ly';
//timeout for each test; timeout for suite set at command line level
......@@ -36,9 +35,9 @@ tap.beforeEach(function () {
// Function clicks the link and returns the url of the resulting page
function clickFooterLinks (linkText) {
return driver.wait(seleniumWebdriver.until.elementLocated(seleniumWebdriver.By.id('footer')))
return driver.wait(webdriver.until.elementLocated(webdriver.By.id('footer')))
.then( function (element) {
return element.findElement(seleniumWebdriver.By.linkText(linkText)); })
return element.findElement(webdriver.By.linkText(linkText)); })
.then( function (element) {
return element.click(); })
.then(function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment