Skip to content

Commit b032044

Browse files
committed
Update image test to add className and refresh screenshot
Add guidance in README to be selective when updating screenshots.
1 parent 7b148e6 commit b032044

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ yarn vitest:update
6666
```
6767

6868
This runs the full suite headlessly with the `--update` flag, regenerating any screenshot baselines that have changed. Commit the updated `.png` files alongside your code changes.
69+
Please be selective in pushing up changes to screenshots and only update files that you have added or expected to change. Pushing up all changes can make it hard to review PRs with small image differences based on different devices or environments that wouldn't trigger failures in CI.
6970

7071
### Markdown Codeblock Tests
7172

__tests__/MarkdownComponents_.test.res

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ test("renders Image with caption", async () => {
203203
let screen = await render(
204204
<div dataTestId="image-wrapper">
205205
<Markdown.Image
206-
src="https://rescript-lang.org/lp/community-3.avif" caption="A sample image caption"
206+
className="rounded-lg border border-gray-90/5 text-gray-60"
207+
src="https://rescript-lang.org/lp/community-3.avif"
208+
caption="A sample image caption"
207209
/>
208210
</div>,
209211
)
32 Bytes
Loading

0 commit comments

Comments
 (0)