Skip to content

Commit 81555fc

Browse files
clarmsojennifer-shehaneflotwig
authored
Install newest Chrome browser before running tests (#6115)
* Install newest Chrome browser when needed * Create command for installing Chrome * Install Chrome without any conditions in run-e2e-tests. Browser is always defined. * Install newest Chrome in e2e tests only if it is needed. * Add condition to install the latest chrome only for chrome e2e tests * Add description to install-latest-chrome. Browser parameter becomes an enum. * Update circle.yml - Add a descriptive name to the install step, so the script doesn't get printed out twice - Let `browser` be any string - we have more browsers on the way 😄 Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com> Co-authored-by: Zach Bloomquist <github@chary.us>
1 parent d816772 commit 81555fc

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

circle.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,30 @@ executors:
5555
PLATFORM: mac
5656

5757
commands:
58+
install-latest-chrome:
59+
description: Install latest Google Chrome (stable)
60+
parameters:
61+
browser:
62+
default: "electron"
63+
description: browser shortname to target
64+
type: string
65+
steps:
66+
- run:
67+
name: Install latest Google Chrome (stable)
68+
command: |
69+
if [ << parameters.browser >> == "chrome" ]; then
70+
echo "**** Running Chrome tests. Installing latest stable version of Google Chrome. ****"
71+
apt-get update
72+
apt-get install google-chrome-stable -y
73+
echo "**** Location of Google Chrome Installation: "`which google-chrome`" ****"
74+
echo "**** Google Chrome Version: "`google-chrome --version`" ****"
75+
else
76+
echo "**** Not updating Chrome. Running tests in '<< parameters.browser >>' ****"
77+
fi
5878
run-e2e-tests:
5979
parameters:
6080
browser:
81+
default: "electron"
6182
description: browser shortname to target
6283
type: string
6384
chunk:
@@ -66,6 +87,8 @@ commands:
6687
steps:
6788
- attach_workspace:
6889
at: ~/
90+
- install-latest-chrome:
91+
browser: << parameters.browser >>
6992
- run:
7093
command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >>
7194
working_directory: packages/server
@@ -493,6 +516,8 @@ jobs:
493516
steps:
494517
- attach_workspace:
495518
at: ~/
519+
- install-latest-chrome:
520+
browser: chrome
496521
- run:
497522
command: npm start
498523
background: true

0 commit comments

Comments
 (0)