This release includes a ts_config runfiles fix so also cleaning up the one line work-around from #31943. This also updates to upstream rules_webtesting browser repositories load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories") to fix a breaking change in the chromedriver distro. This bumps up the version of chromium to the version here: https://github.com/bazelbuild/rules_webtesting/blob/master/web/versioned/browsers-0.3.2.bzl PR Close #32151
14 lines
596 B
TypeScript
14 lines
596 B
TypeScript
import { browser } from 'protractor';
|
|
import {OnPrepareConfig, runServer} from '@bazel/protractor/protractor-utils';
|
|
import * as path from 'path';
|
|
|
|
export = function(config: OnPrepareConfig) {
|
|
const isProdserver = path.basename(config.server, path.extname(config.server)) === 'prodserver';
|
|
return runServer(config.workspace, config.server, isProdserver ? '-p' : '-port', [])
|
|
.then(serverSpec => {
|
|
const serverUrl = `http://localhost:${serverSpec.port}`;
|
|
console.log(`Server has been started, starting tests against ${serverUrl}`);
|
|
browser.baseUrl = serverUrl;
|
|
});
|
|
}
|