diff --git a/circle.yml b/circle.yml index f244d517..74ea0d50 100644 --- a/circle.yml +++ b/circle.yml @@ -9,6 +9,7 @@ dependencies: pre: - npm i -g get-firefox - get-firefox --platform linux --extract --target /home/ubuntu/send + - npm i -g geckodriver deployment: latest: diff --git a/test/frontend/driver.js b/test/frontend/driver.js index c85d65f8..96ad4c7b 100644 --- a/test/frontend/driver.js +++ b/test/frontend/driver.js @@ -1,22 +1,22 @@ -var webdriver = require('selenium-webdriver'), - By = webdriver.By, - until = webdriver.until; +const webdriver = require('selenium-webdriver'); +const path = require('path'); +const until = webdriver.until; -var driver = new webdriver.Builder() +const driver = new webdriver.Builder() .forBrowser('firefox') .build(); -driver.get('file:///' + __dirname + '/frontend.test.html'); +driver.get(path.join('file:///', __dirname, '/frontend.test.html')); driver.wait(until.titleIs('Mocha Tests'), 1000); driver.wait(until.titleMatches(/^[0-1]$/), 10000); driver.getTitle().then(title => { driver.quit().then(() => { - if (title === "0") { - process.exit(0); + if (title === '0') { + // process.exit(0); } else { - throw new Error(`Frontend tests are failing. ` + - `Please open the frontend.test.html file in a browser.`); + throw new Error('Frontend tests are failing. ' + + 'Please open the frontend.test.html file in a browser.'); } }) }) \ No newline at end of file