Files
gerrit/polygerrit-ui/app/test/functional/infra/test-infra.js
Viktar Donich 7cbe1e493e Functional test suite starter
Contains test runner Docker file and a sample smoke test. Smoke test
build PolyGerrit app, serves it locally and expects page title to be
updated to the default value.

Change-Id: I8ab2ca8a97830eefa1c697c2e51be82cbc1657c7
2018-02-13 20:12:30 -08:00

25 lines
442 B
JavaScript

'use strict';
const {Builder} = require('selenium-webdriver');
let driver;
function setup() {
return new Builder()
.forBrowser('chrome')
.usingServer('http://localhost:4444/wd/hub')
.build()
.then(d => {
driver = d;
return driver.get('http://localhost:8080');
})
.then(() => driver);
}
function cleanup() {
return driver.quit();
}
exports.setup = setup;
exports.cleanup = cleanup;