Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Update Storybook Playwright test CI job name and testing docs (#2460)

Olga Bulatf27b8b3103d2
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index 3691c9433..b0bce8094 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -565,13 +565,13 @@ jobs:
name:
- playwright_vr
- playwright_e2e
- - storybook_vr
+ - storybook
include:
- name: playwright_vr
script: "test:playwright visual-regression"
- name: playwright_e2e
script: "test:playwright e2e"
- - name: storybook_vr
+ - name: storybook
script: "test:storybook"
steps:
@@ -609,7 +609,7 @@ jobs:
name:
- playwright_vr
- playwright_e2e
- - storybook_vr
+ - storybook
steps:
- name: Pass
diff --git a/documentation/frontend/reference/storybook_tests.md b/documentation/frontend/reference/storybook_tests.md
index 235066ceb..9502c1e18 100644
--- a/documentation/frontend/reference/storybook_tests.md
+++ b/documentation/frontend/reference/storybook_tests.md
@@ -4,12 +4,20 @@ We run Playwright tests for our Nuxt application. We also run them for
Storybook, where components are tested in isolation and (ideally) in a
comprehensive way that is not always possible inside an actual application.
-Generally it is preferable to write regular Jest tests with
+Generally, it is preferable to write regular Jest tests with
`@testing-library/vue`, however, some interactions require a real web browser
-context (like loading audio files, testing drag and drop interactions, etc). For
-these, Playwright is the perfect tool. We can also use Playwright to write
-visual regression tests for components in isolation so that we don't have to
-duplicate things like focus state testing into our application level tests.
+context (like loading audio files, complex popover interactions, testing drag
+and drop interactions, etc). For these, Playwright is the perfect tool.
+
+We also use Playwright to write visual regression tests for components in
+isolation so that we don't have to duplicate things like focus state testing
+into our application-level tests. Sometimes, components cannot be tested in the
+full app because they are shifted 1-2 pixels between the tests and therefore the
+identical images do not match due to shifting.
+
+You will find the functional component tests in `/test/storybook/functional`,
+and visual regression tests that with snapshots in
+`/test/storybook/visual-regression`
Our Nuxt playwright tests are described by the
[Playwright testing guide](./playwright_tests.md). Please see the section on
diff --git a/documentation/meta/ci_cd/jobs/frontend.md b/documentation/meta/ci_cd/jobs/frontend.md
index f864c741f..6b81a9357 100644
--- a/documentation/meta/ci_cd/jobs/frontend.md
+++ b/documentation/meta/ci_cd/jobs/frontend.md
@@ -40,7 +40,7 @@ Node.js scripts.
| ---------------- | ----------------------------------- |
| `playwright_vr` | `test:playwright visual-regression` |
| `playwright_e2e` | `test:playwright e2e` |
-| `storybook_vr` | `test:storybook` |
+| `storybook` | `test:storybook` |
This job is skipped if the frontend codebase has not changed.