Skip to content

Commit

Permalink
bring back chrome install + set protractor chrome location
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH committed Sep 17, 2023
1 parent 298dcc9 commit 430d8e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
export TZ=America/Los_Angeles
export PATH="$(systemd-path user-binaries):$PATH"
sudo apt-get -y update
sudo apt-get --only-upgrade install google-chrome-stable
chrome --version
sudo apt-get -y install libcurl4-openssl-dev libjson-c-dev
sudo service postgresql stop || true
sudo service postgresql start 12
Expand All @@ -67,6 +65,10 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install latest chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- name: Install webauthn
run: |
sudo useradd -m -r webauthn
Expand Down
10 changes: 8 additions & 2 deletions test/e2e/utils/protractor.configuration.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const execSync = require('child_process').execSync;

exports.getConfig = function(options) {
var config = {
framework: 'jasmine2',
Expand Down Expand Up @@ -76,6 +78,12 @@ exports.getConfig = function(options) {
if (process.env.HEADLESS == "true") {
config.capabilities.chromeOptions.args.push('--headless=new');
config.capabilities.chromeOptions.args.push('--disable-gpu');

if (process.env.CI) {
const chormeBinary = execSync('which chrome').toString().trim();
console.log(`chrome binary location is ${chormeBinary}`);
config.capabilities.chromeOptions.binary = chormeBinary;
}
}
}

Expand Down Expand Up @@ -130,7 +138,6 @@ exports.getConfig = function(options) {
}
}

var execSync = require('child_process').execSync;
var remoteChaiseDirPath = process.env.REMOTE_CHAISE_DIR_PATH;
var cmd = 'sudo cp ' + chaiseFilePath + " " + ("/var/www/html/chaise/chaise-config.js");

Expand All @@ -144,7 +151,6 @@ exports.getConfig = function(options) {


var code = execSync(cmd);
console.log(code);
if (code == 0) console.log("Copied file " + chaiseFilePath + " successfully to chaise-config.js \n");
else {
console.log("Unable to copy file " + chaiseFilePath + " to chaise-config.js \n");
Expand Down

0 comments on commit 430d8e0

Please sign in to comment.