
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
25 lines
442 B
JavaScript
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;
|