You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add E2E tests for chromium and firefox (#1121)
* feat: add E2E tests for chromium and firefox
* fix: do not use arrow functions in mocha
* feat: create a workflow for running e2e tests
* chore: apply review comments
* chore: support override of firefox image
* fix(test): await async destroy operation
* chore: address review comments
- replace fixed delays with exponential backoff
- make download-release-artifacts.sh work even if build dir already exists
- document how to run e2e tests locally
- delete user/group if it already exists during release build in docker
- make it easier to add new e2e test cases in the future
* chore: allow overriding access control settings through env
* Update docs/DEVELOPER-NOTES.md
Co-authored-by: Russell Dempsey <[email protected]>
Co-authored-by: Russell Dempsey <[email protected]>
Copy file name to clipboardExpand all lines: docs/CONTRIBUTING.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ If you want to download translations from Transifex and run them locally, make s
32
32
33
33
## Writing Code
34
34
35
-
**If you plan to write code make sure to read [Developer Notes](./docs/DEVELOPER-NOTES.md) to get familiar with tools and commands that will make your work easier.**
35
+
**If you plan to write code make sure to read [Developer Notes](DEVELOPER-NOTES.md) to get familiar with tools and commands that will make your work easier.**
36
36
37
37
## How to Help with Things Beyond Browser Extension?
Copy file name to clipboardExpand all lines: docs/DEVELOPER-NOTES.md
+88
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,94 @@ Release build shortcuts:
137
137
-`npm run dev-build`: All-in-one: fast dependency install, build with yarn (updates `yarn.lock` if needed)
138
138
-`npm run release-build`: Reproducible release build in docker with frozen `yarn.lock`
139
139
140
+
E2E tests:
141
+
142
+
-`npm run compose:e2e:prepare`: Pull and build docker images for e2e tests
143
+
-`npm run compose:e2e:up`: Start e2e test docker environment
144
+
-`npm run compose:e2e:test`: Run e2e tests in the docker environment
145
+
-`npm run compose:e2e:down`: Stop e2e test docker environment
146
+
147
+
## Running E2E tests
148
+
149
+
E2E tests are run in a docker environment, so you need to have docker installed.
150
+
151
+
### Preparing extension builds
152
+
153
+
You can run the tests against either release or dev builds of the extension.
154
+
155
+
To download release builds of the extension, run:
156
+
157
+
```sh
158
+
./ci/e2e/download-release-builds.sh
159
+
```
160
+
161
+
_NOTE_: When using release builds, you can control the version of the extension by setting the `IPFS_COMPANION_VERSION` environment variable:
162
+
163
+
```sh
164
+
export IPFS_COMPANION_VERSION=x.y.z
165
+
```
166
+
167
+
To build dev versions of the extension, run:
168
+
169
+
```sh
170
+
npm run build
171
+
```
172
+
173
+
or (to perform the build inside a docker container):
174
+
175
+
```sh
176
+
npm run release-build
177
+
```
178
+
179
+
### Preparing the docker environment
180
+
181
+
You need to pull docker images for [Kubo](https://github.com/ipfs/kubo), [Chromium](https://hub.docker.com/r/selenium/standalone-chrome/) and [Firefox](https://hub.docker.com/r/selenium/standalone-firefox/) before running the tests.
182
+
183
+
You also need to build the docker image containing the e2e tests.
184
+
185
+
To do all of this, run:
186
+
187
+
```sh
188
+
npm run compose:e2e:prepare
189
+
```
190
+
191
+
_NOTE_: You can control the versions of Kubo, Chromium and Firefox by setting the following environment variables:
192
+
193
+
```sh
194
+
export KUBO_VERSION=x.y.z
195
+
export CHROMIUM_VERSION=x.y.z
196
+
export FIREFOX_VERSION=x.y.z
197
+
```
198
+
199
+
**IMPORTANT**: If you are running the tests on a ARM machine, you need to use a different Chromium image. To do this, run:
0 commit comments