-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add ADR on removing snapshot tests (#658)
* doc: add adr on removing snapshot tests
- Loading branch information
Showing
2 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 1. Remove snapshot tests | ||
|
||
Date: 2024-03-12 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Several team members believe that the efforts of keeping snapshot tests are not worth the effort. | ||
|
||
There have been several external reasons to make a decision as to keep snapshot tests, such as the current tool [storyshots](https://storybook.js.org/addons/@storybook/addon-storyshots/) (storybook plugin) being [deprecated](https://github.com/storybookjs/storybook/issues/24657). With the recent [v8.0.0 release of storybook](https://github.com/storybookjs/storybook/releases/tag/v8.0.0), the plugin is now officially unsupported. The previous snapshot test setup was removed and marked as `todo`. | ||
|
||
We consider to either fully remove snapshot tests altogether or follow the [migration guide](https://storybook.js.org/docs/writing-tests/storyshots-migration-guide) to move to the new [Storybook test runner](https://storybook.js.org/docs/writing-tests/test-runner). | ||
|
||
## Decision | ||
|
||
As a group we decided NOT to migrate to the new test configuration but instead REMOVE snapshot tests: | ||
|
||
- Nobody gained additional confidence from snapshot tests | ||
- Most felt updating snapshots to be an unneeded chore | ||
- Some mentioned snapshot tests failing in unforeseen and hard-to-debug ways | ||
- Some felt reducing dependencies and speeding up tests are helpful | ||
- All agreed to instead commit to writing component / interaction tests | ||
|
||
## Consequences | ||
|
||
- The previous snapshot test implementation was already removed in the update to [storybook v8.0.0](https://github.com/digitalservicebund/a2j-rechtsantragstelle/commit/ad46328c199c890c1e0c6971f6994ee0267177b3) (commit `ad46328`), no action needed. | ||
|
||
- With merging of this ADR, the test file containing the reminder will be removed. | ||
|
||
- A ticket for adding component test already exists, the current priority on implementing them was noted there. |
This file was deleted.
Oops, something went wrong.