Skip to content

Commit ce8ae23

Browse files
committed
feat: add geckodriver to cypress/browsers and cypress/included
1 parent e6d549f commit ce8ae23

File tree

5 files changed

+14
-52
lines changed

5 files changed

+14
-52
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ Cypress officially [supports][Cypress Browser Support] the latest 3 major versio
5252
[Chromium]: https://www.chromium.org/Home/
5353
[Cypress Browser Support]: https://docs.cypress.io/app/references/launching-browsers#Browser-versions-supported
5454

55+
### Mozilla geckodriver
56+
57+
[cypress/browsers](./browsers/) and [cypress/included](./included/) images with Firefox `139.0` and above are built with the [Mozilla geckodriver](https://github.com/mozilla/geckodriver) included. This driver is needed to test when using Firefox with Cypress versions >= [13.15.1](https://docs.cypress.io/app/references/changelog#13-15-1). The environment variable `GECKODRIVER_PATH` points to the driver located at `/opt/geckodriver/geckodriver`. Earlier images, that do not include the driver, may attempt to download the driver at run-time when testing Firefox, causing failures in air-gapped network environments with no Internet access.
58+
59+
[cypress/factory](./factory/) provides the parameter [GECKODRIVER_VERSION](./factory/README.md#geckodriver_version) to optionally add the driver to a custom image.
60+
5561
### Debian packages
5662

5763
[Debian][Debian packages] provides two Cypress-compatible browsers as packages covering both `amd64` and `arm64` architectures.

circle.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ workflows:
260260
test-factory-cypress-included-electron,
261261
test-factory-cypress-included-electron-non-root-user,
262262
test-factory-cypress-included-firefox,
263-
test-factory-cypress-included-firefox-geckodriver,
264263
test-factory-cypress-included-firefox-non-root-user,
265264
test-factory-all-included-electron-only,
266265
]
@@ -281,7 +280,6 @@ workflows:
281280
test-factory-cypress-included-electron-non-root-user,
282281
test-factory-cypress-included-chrome,
283282
test-factory-cypress-included-firefox,
284-
test-factory-cypress-included-firefox-geckodriver,
285283
test-factory-cypress-included-firefox-non-root-user,
286284
test-factory-cypress-included-edge,
287285
test-factory-all-included,

factory/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ EDGE_VERSION='136.0.3240.76-1'
3333

3434
# Firefox versions: https://download-installer.cdn.mozilla.net/pub/firefox/releases/
3535
# Linux/amd64 for all versions, Linux/arm64 for versions 136.0 and above
36-
FIREFOX_VERSION='138.0.4'
36+
FIREFOX_VERSION='139.0'
3737

3838
# Geckodriver versions: https://github.com/mozilla/geckodriver/releases
3939
# Geckodriver documentation: https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html

factory/docker-compose.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232
CYPRESS_VERSION: ${CYPRESS_VERSION}
3333
EDGE_VERSION: ${EDGE_VERSION}
3434
FIREFOX_VERSION: ${FIREFOX_VERSION}
35+
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
3536
YARN_VERSION: ${YARN_VERSION}
3637
# WEBKIT_VERSION: ${WEBKIT_VERSION}
3738
tags:
@@ -51,6 +52,7 @@ services:
5152
YARN_VERSION: ${YARN_VERSION}
5253
CHROME_VERSION: ${CHROME_VERSION}
5354
FIREFOX_VERSION: ${FIREFOX_VERSION}
55+
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
5456
EDGE_VERSION: ${EDGE_VERSION}
5557
tags:
5658
- ${REPO_PREFIX-}cypress/browsers:latest # comment out for release of alternate version
@@ -101,19 +103,6 @@ services:
101103

102104
firefox:
103105
image: ${REPO_PREFIX-}cypress/firefox
104-
build:
105-
target: default_image
106-
context: .
107-
args:
108-
NODE_VERSION: ${NODE_VERSION}
109-
FACTORY_VERSION: ${FACTORY_VERSION}
110-
FIREFOX_VERSION: ${FIREFOX_VERSION}
111-
tags:
112-
- ${REPO_PREFIX-}cypress/firefox:${FIREFOX_VERSION}
113-
command: firefox --version
114-
115-
firefox-geckodriver:
116-
image: ${REPO_PREFIX-}cypress/firefox-geckodriver
117106
build:
118107
target: default_image
119108
context: .
@@ -123,7 +112,7 @@ services:
123112
FIREFOX_VERSION: ${FIREFOX_VERSION}
124113
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
125114
tags:
126-
- ${REPO_PREFIX-}cypress/firefox-geckodriver:${FIREFOX_VERSION}-${GECKODRIVER_VERSION}
115+
- ${REPO_PREFIX-}cypress/firefox:${FIREFOX_VERSION}
127116
command: firefox --version
128117

129118
# webkit:
@@ -181,20 +170,6 @@ services:
181170

182171
cypress-firefox:
183172
image: ${REPO_PREFIX-}cypress/cypress-firefox
184-
build:
185-
target: default_image
186-
context: .
187-
args:
188-
NODE_VERSION: ${NODE_VERSION}
189-
FACTORY_VERSION: ${FACTORY_VERSION}
190-
CYPRESS_VERSION: ${CYPRESS_VERSION}
191-
FIREFOX_VERSION: ${FIREFOX_VERSION}
192-
tags:
193-
- ${REPO_PREFIX-}cypress/cypress-firefox:cypress-${CYPRESS_VERSION}-firefox-${FIREFOX_VERSION}
194-
command: node -v
195-
196-
cypress-firefox-geckodriver:
197-
image: ${REPO_PREFIX-}cypress/cypress-firefox-geckodriver
198173
build:
199174
target: default_image
200175
context: .
@@ -205,7 +180,7 @@ services:
205180
FIREFOX_VERSION: ${FIREFOX_VERSION}
206181
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
207182
tags:
208-
- ${REPO_PREFIX-}cypress/cypress-firefox:cypress-${CYPRESS_VERSION}-firefox-${FIREFOX_VERSION}-geckodriver-${GECKODRIVER_VERSION}
183+
- ${REPO_PREFIX-}cypress/cypress-firefox:cypress-${CYPRESS_VERSION}-firefox-${FIREFOX_VERSION}
209184
command: node -v
210185

211186
## Test image

factory/test-project/docker-compose.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,6 @@ services:
4040
command: npm run test -- -b chrome
4141

4242
test-factory-firefox:
43-
build:
44-
args:
45-
NODE_VERSION: ${NODE_VERSION}
46-
FIREFOX_VERSION: ${FIREFOX_VERSION}
47-
BASE_TEST_IMAGE: cypress/factory:${FACTORY_VERSION}
48-
context: .
49-
command: npm run test -- -b firefox
50-
51-
test-factory-firefox-geckodriver:
5243
build:
5344
args:
5445
NODE_VERSION: ${NODE_VERSION}
@@ -100,17 +91,6 @@ services:
10091
command: cypress run -b chrome
10192

10293
test-factory-cypress-included-firefox:
103-
build:
104-
args:
105-
NODE_VERSION: ${NODE_VERSION}
106-
CYPRESS_VERSION: ${CYPRESS_VERSION}
107-
FIREFOX_VERSION: ${FIREFOX_VERSION}
108-
BASE_TEST_IMAGE: cypress/factory:${FACTORY_VERSION}
109-
dockerfile: included.Dockerfile
110-
context: .
111-
command: cypress run -b firefox
112-
113-
test-factory-cypress-included-firefox-geckodriver:
11494
build:
11595
args:
11696
NODE_VERSION: ${NODE_VERSION}
@@ -129,6 +109,7 @@ services:
129109
NODE_VERSION: ${NODE_VERSION}
130110
CYPRESS_VERSION: ${CYPRESS_VERSION}
131111
FIREFOX_VERSION: ${FIREFOX_VERSION}
112+
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
132113
BASE_TEST_IMAGE: cypress/factory:${FACTORY_VERSION}
133114
dockerfile: included-non-root-user.Dockerfile
134115
context: .
@@ -162,6 +143,7 @@ services:
162143
CYPRESS_VERSION: ${CYPRESS_VERSION}
163144
CHROME_VERSION: ${CHROME_VERSION}
164145
FIREFOX_VERSION: ${FIREFOX_VERSION}
146+
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
165147
EDGE_VERSION: ${EDGE_VERSION}
166148
BASE_TEST_IMAGE: cypress/factory:${FACTORY_VERSION}
167149
dockerfile: included.Dockerfile
@@ -176,6 +158,7 @@ services:
176158
CYPRESS_VERSION: ${CYPRESS_VERSION}
177159
CHROME_VERSION: ${CHROME_VERSION}
178160
FIREFOX_VERSION: ${FIREFOX_VERSION}
161+
GECKODRIVER_VERSION: ${GECKODRIVER_VERSION}
179162
EDGE_VERSION: ${EDGE_VERSION}
180163
BASE_TEST_IMAGE: cypress/factory:${FACTORY_VERSION}
181164
dockerfile: included.Dockerfile

0 commit comments

Comments
 (0)