Skip to content

Commit

Permalink
build: test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Nov 2, 2018
1 parent 599b5ef commit 426bd23
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions packages/bazel/src/protractor/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,27 @@ if (process.env['WEB_TEST_METADATA']) {
}
} else {
if (DEBUG) console.info(`Using local browsers`);
const SeleniumConfig = require('webdriver-manager/built/lib/config').Config;
switch (conf.capabilities.browserName) {
case 'chrome':
if (!conf.chromeDriver) {
// ChromeDriver not specified directly
let updateConfig;
try {
const updateJson = path.resolve(SeleniumConfig.getSeleniumDir(), 'update-config.json');
updateConfig = JSON.parse(fs.readFileSync(updateJson).toString());
} catch (e) {
throw new Error(`Could not find update-config.json: ${e}`);
}
try {
const chromeDriverFile = require.resolve(pathAfter(updateConfig.chrome.last, 'node_modules'));
conf.chromeDriver = chromeDriverFile;
} catch (e) {
throw new Error(`Could not find chrome-diver: ${e}`);
}
}
break;
}
// const SeleniumConfig = require('webdriver-manager/built/lib/config').Config;
// switch (conf.capabilities.browserName) {
// case 'chrome':
// if (!conf.chromeDriver) {
// // ChromeDriver not specified directly
// let updateConfig;
// try {
// const updateJson = path.resolve(SeleniumConfig.getSeleniumDir(), 'update-config.json');
// updateConfig = JSON.parse(fs.readFileSync(updateJson).toString());
// } catch (e) {
// throw new Error(`Could not find update-config.json: ${e}`);
// }
// try {
// const chromeDriverFile = require.resolve(pathAfter(updateConfig.chrome.last, 'node_modules'));
// conf.chromeDriver = chromeDriverFile;
// } catch (e) {
// throw new Error(`Could not find chrome-diver: ${e}`);
// }
// }
// break;
// }
}

// Export the complete protractor configuration
Expand Down

0 comments on commit 426bd23

Please sign in to comment.