Commit 216b23a
test: replace story screenshots with DOM snapshots (#2819)
Fixes #2817. Part 2 of 2 — follows #2818, and is now rebased onto
master.
Stories that are not rendered in a webgl canvas are now verified with
DOM snapshots instead of, or in addition to, image snapshots:
- The storybook test-runner snapshots the `#storybook-root` inner HTML
unless a story is tagged `no-dom-test`.
- Webgl based stories are tagged `no-dom-test`, since their canvas
content is not represented in the DOM.
- Pure DOM stories are tagged `no-screenshot-test`, and their image
snapshots are removed (12 PNGs).
- `.storybook/test-runner.ts` is now fully typed, so its
`@ts-expect-error` directives and its `tsconfig.typecheck.json`
exclusion are removed.
This is a port of #2619 onto current master. Stories added since that PR
was written (`WellsLayerSubs`, `PolylineGroupLayer`,
`GroupTreePlot.interactive`) are tagged consistently with their
siblings.
### Verification
Snapshots were generated with `npm run compose:storybook:test:update`. A
full `npm run compose:storybook:test` run passes all 187 DOM snapshots,
and a targeted re-run of the 12 DOM-snapshot suites passes 23/23
snapshots, confirming the DOM output is deterministic against the static
storybook build.
Note: the `WellLogViewer` / `SyncLogViewer` image snapshots differ in my
local environment, and Chromium intermittently fails with
`page.screenshot: Protocol error (Unable to capture screenshot)`. Both
reproduce on the base branch without these changes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 885e3a5 commit 216b23a
69 files changed
Lines changed: 9015 additions & 8 deletions
File tree
- typescript
- .storybook
- packages
- group-tree-plot/src/storybook
- subsurface-viewer/src/storybook
- components
- __image_snapshots__
- __snapshots__
- colorLegends
- settings
- __image_snapshots__
- __snapshots__
- examples
- extensions
- layers
- schemaValidation
- sub_layers
- well-completions-plot/src/__snapshots__
- well-log-viewer/src
- Storybook
- __snapshots__
- components
- __image_snapshots__
- __snapshots__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | | - | |
10 | | - | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments