2019-02-06 12:03:58 -05:00
|
|
|
/**
|
|
|
|
* @license
|
2020-05-19 15:08:49 -04:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2019-02-06 12:03:58 -05:00
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2019-07-24 11:52:26 -04:00
|
|
|
const protractorUtils = require('@bazel/protractor/protractor-utils');
|
2019-02-06 12:03:58 -05:00
|
|
|
const protractor = require('protractor');
|
|
|
|
|
|
|
|
module.exports = async function(config) {
|
|
|
|
const {port} = await protractorUtils.runServer(config.workspace, config.server, '-port', []);
|
|
|
|
const processedConfig = await protractor.browser.getProcessedConfig();
|
|
|
|
const serverUrl = `http://localhost:${port}`;
|
|
|
|
|
|
|
|
return processedConfig.baseUrl = protractor.browser.baseUrl = serverUrl;
|
|
|
|
};
|