Skip to content

Commit

Permalink
Merge pull request #340 from chromaui/interaction-testing-vs-e2evt
Browse files Browse the repository at this point in the history
Add FAQ for E2EVT vs interaction tests
  • Loading branch information
domyen authored Dec 23, 2023
2 parents 59f72c2 + 3532594 commit fde99cf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/content/configuration/e2e-visual-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,15 @@ The tradeoff is that the full E2E test suite needs to be run before generating t
If you're developing a new UI, we recommend writing stories for comprehensive coverage. If you're adding visual tests to an existing UI that already has E2E tests, we recommend E2EVT to cover the "happy paths".

</details>

<details>

<summary>What's the difference between E2E Visual Tests and interaction tests?</summary>

Both simulate user behavior, but that's where the similarities end.

E2E Visual Tests are for user flows that go from page-to-page. Chromatic takes snapshots during the Playwright/Cypress test run to detect visual changes in key pages of the user flow. These tests aren't made to express every state of a component because it would be too cumbersome to script and expensive to run.

[Interaction tests](/docs/interactions) simulate user behavior in Storybook stories. When Chromatic runs, it tests those assertions. If the assertion passes, a snapshot is taken and visually tested. If it fails, the test gets badged as "failed". Interaction tests are made to express the states of a component that require user interaction. They do not support user flows that go from page-to-page.

</details>

1 comment on commit fde99cf

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.