Skip to content

Commit ac6b1a1

Browse files
committed
use the chromedriver npm package to download the webdriver version compatible with the installed chrome version
1 parent edc4753 commit ac6b1a1

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
5454
restore-keys: ${{ runner.os }}-yarn-
5555

56+
- name: Install the latest chromedriver compatible with the installed chrome version
57+
run: yarn global add chromedriver --detect_chromedriver_version
58+
5659
- name: Install Yarn dependencies
5760
run: yarn install --frozen-lockfile
5861

@@ -94,7 +97,9 @@ jobs:
9497
run: curl http://localhost:8080/server/api
9598

9699
- name: Run e2e tests (integration tests)
97-
run: yarn run e2e:ci
100+
run: |
101+
chromedriver &
102+
yarn run e2e:ci
98103
99104
- name: Shutdown Docker containers
100105
run: docker-compose -f ./docker/docker-compose-ci.yml down

e2e/protractor-ci.conf.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ config.capabilities = {
77
}
88
};
99

10+
// don't use protractor's webdriver, as it may be incompatible with the installed chrome version
11+
config.directConnect = false;
12+
config.seleniumAddress = 'http://localhost:4444/wd/hub';
13+
1014
exports.config = config;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"lint": "ng lint",
3333
"lint-fix": "ng lint --fix=true",
3434
"e2e": "ng e2e",
35-
"e2e:ci": "ng e2e --protractor-config=./e2e/protractor-ci.conf.js",
35+
"e2e:ci": "ng e2e --webdriver-update=false --protractor-config=./e2e/protractor-ci.conf.js",
3636
"compile:server": "webpack --config webpack.server.config.js --progress --color",
3737
"serve:ssr": "node dist/server",
3838
"clean:coverage": "rimraf coverage",

0 commit comments

Comments
 (0)