Skip to content

Commit 0c8574c

Browse files
authored
docs: update e2e tests section on the contributing guide (podman-desktop#8750)
Signed-off-by: Daniel Villanueva <[email protected]>
1 parent 99fc8d5 commit 0c8574c

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

CONTRIBUTING.md

+31-3
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,43 @@ Check the npm script tasks in our `package.json` for more options.
150150

151151
### Step 5. Run E2E tests
152152

153-
In case of adding new feature, it is always suitable to make sure we do not bring any new regression. For this purpose we are using the E2E tests. They can be run using `pnpm`:
153+
In case of adding new feature, it is always suitable to make sure we do not bring any new regression. For this purpose we are using the E2E tests. They can be built and run using `pnpm` with a variety of options:
154+
155+
- For all the tests:
156+
157+
```sh
158+
pnpm test:e2e
159+
```
160+
161+
- For the smoke tests:
154162

155163
```sh
156164
pnpm test:e2e:smoke
157165
```
158166

159-
Although, there are requirements that need to be fulfilled before running the tests in order to make them pass:
167+
- For the extension tests:
168+
169+
```sh
170+
pnpm test:e2e:extension
171+
```
172+
173+
You can find more specific options on the [package.json](https://github.com/containers/podman-desktop/blob/main/package.json) file, under 'scripts'.
174+
175+
However, there are some things that you have to take into account:
176+
177+
- In order to make the tests pass you have to either:
178+
- Remove `settings.json` from `~/.local/share/containers/podman-desktop/configuration/` or,
179+
- Remove the objects with keys `"welcome.version"` and `"telemetry.*"` from the file, if you do not want to lose your settings
180+
- Some of the tests can only be executed in certain operating systems. If your execution is skipping a test, this is very likely the reason why.
181+
- If you want to execute the tests outside of the repository, you can find a setup guide in this [README](https://github.com/containers/podman-desktop/tree/main/tests/playwright#podman-desktop-playwright-tests).
182+
183+
Finally, after executing the E2E tests, you can check the results in your browser with:
184+
185+
```sh
186+
pnpm exec playwright show-report tests/playwright/output/html-results
187+
```
160188

161-
- remove `settings.json` from `~/.local/share/containers/podman-desktop/configuration/` or if you do not want to lose your settings, remove the objects from the file with keys `"welcome.version"` and `"telemetry.*"`
189+
In case of an error, you can find more information that can help you debug in the `podman-desktop/tests/playwright/output` folder. You have the video repetitions on `videos`, captures of the application failing the test on `screenshots`, and the traces of the execution on `traces`. The latter ones can be opened with `npx playwright show-trace <path/to/trace/zip`.
162190

163191
### Step 6. Code coverage
164192

0 commit comments

Comments
 (0)