Skip to content

Commit 1c05ef0

Browse files
madewithkodedhruvkbzackkrida
authored
combine frontend testing documentation pages (#4546)
Co-authored-by: Dhruv Bhanushali <hi@dhruvkb.dev> Co-authored-by: zack <6351754+zackkrida@users.noreply.github.com>
1 parent 7a09b20 commit 1c05ef0

File tree

7 files changed

+263
-311
lines changed

7 files changed

+263
-311
lines changed

.github/workflows/ci_cd.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,9 @@ jobs:
825825
826826
It looks like some of the Playwright tests failed. You can download the trace output and image diffs for the failed tests under the "Artifacts" section in the above page.
827827
828-
You can read the [docs on how to use this artifact](https://docs.openverse.org/frontend/reference/playwright_tests.html#debugging).
828+
You can read the [docs on how to use this artifact](https://docs.openverse.org/frontend/reference/testing_guidelines.html#debugging).
829+
830+
Additionally, if you made changes to the frontend UI, you may need to [update relevant playwright test snapshots](https://docs.openverse.org/frontend/guides/test.html#updating-snapshots).
829831
830832
If the test is flaky, follow the [flaky test triage procedure](https://docs.openverse.org/general/test.html#flaky-tests).
831833
$EOF

documentation/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def add_ext_to_path():
103103
"meta/contribution/maintainer_tasks": "/general/contribution/maintainer_tasks.html",
104104
"meta/contribution/codespell": "/general/contribution/codespell.html",
105105
"meta/contribution/good_first_and_help_wanted_issues": "/general/contribution/good_first_and_help_wanted_issues.html",
106+
"frontend/reference/playwright_tests.html": "/frontend/reference/testing_guidelines.html#playwright-tests",
107+
"frontend/reference/storybook_tests.html": "/frontend/reference/testing_guidelines.html#storybook-tests",
106108
}
107109

108110
myst_enable_extensions = ["linkify"]

documentation/frontend/guides/test.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
Once you've made some changes to the codebase, it is important to run tests.
44
Openverse uses unit tests, Playwright tests for end-to-end, and visual
55
regression testing of the app and Storybook components. This guide will help you
6-
run the tests. To learn more about how to test PRs, read the
7-
[testing guidelines](/frontend/reference/testing_guidelines.md). To learn more
8-
about the Playwright tests, read
9-
[this guide](/frontend/reference/playwright_tests.md). To learn more about the
10-
Storybook visual regression tests, read
11-
[this guide](/frontend/reference/storybook_tests.md).
6+
run the tests. To learn more about how to test PRs, Playwright tests and
7+
Storybook visual regression tests read the
8+
[testing guidelines](/frontend/reference/testing_guidelines.md).
129

1310
## Steps
1411

@@ -44,6 +41,19 @@ Storybook visual regression tests, read
4441
./ov just frontend/run test:storybook
4542
```
4643

44+
````{note}
45+
This will run the Storybook visual regression tests inside a docker container. Should you wish to run the
46+
tests locally, you can use the command below. However, please note that unless
47+
you are running the same operating system (down to the distro, in some cases)
48+
there are likely to be visual rendering differences that will cause snapshot
49+
tests to fail on false-positives.
50+
51+
```bash
52+
./ov just frontend/run test:storybook:local
53+
```
54+
55+
````
56+
4757
## Updating snapshots
4858

4959
If you've made changes to the frontend that require updating snapshots, you can

documentation/frontend/reference/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
i18n
77
feature_flags
88
testing_guidelines
9-
playwright_tests
10-
storybook_tests
119
miscellaneous
1210
healthcheck
1311
nginx

documentation/frontend/reference/playwright_tests.md

Lines changed: 0 additions & 233 deletions
This file was deleted.

documentation/frontend/reference/storybook_tests.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)