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.ymlindex 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+ - storybookinclude:- name: playwright_vrscript: "test:playwright visual-regression"- name: playwright_e2escript: "test:playwright e2e"- - name: storybook_vr+ - name: storybookscript: "test:storybook"steps:@@ -609,7 +609,7 @@ jobs:name:- playwright_vr- playwright_e2e- - storybook_vr+ - storybooksteps:- name: Passdiff --git a/documentation/frontend/reference/storybook_tests.md b/documentation/frontend/reference/storybook_tests.mdindex 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 forStorybook, where components are tested in isolation and (ideally) in acomprehensive 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 ondiff --git a/documentation/meta/ci_cd/jobs/frontend.md b/documentation/meta/ci_cd/jobs/frontend.mdindex 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.