Skip to content

Commit 44b2eef

Browse files
committed
feat add screenshot test
1 parent f6e8d89 commit 44b2eef

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

app/home/common/CiCheck.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function CiCheck({
110110
className={clsx("flex items-center gap-10", className)}
111111
data-visual-test="blackout"
112112
>
113-
<Check status={status} />
113+
<Check status={status} data-visual-test="blackout" />
114114
<div className="relative flex flex-col gap-2">
115115
<GitHubMark />
116116
<GitLabMark />

app/home/hero/Hero.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ export function Hero() {
8989
</div>
9090
<AppSvg />
9191
</a>
92-
<AutomaticCheck className="-ml-5 mt-5" />
92+
<AutomaticCheck
93+
className="-ml-5 mt-5"
94+
data-visual-test="blackout"
95+
/>
9396
</div>
9497
<BgGradient />
9598
</div>

app/home/visual-testing/ReviewChanges.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import clsx from "clsx";
44
import * as React from "react";
55

6-
import { Button } from "@/components/Button";
7-
86
import { CiCheck } from "../common/CiCheck";
97
import { ChangesSvg } from "./ChangesSvg";
108

@@ -26,7 +24,7 @@ export function ReviewChanges({ className }: { className?: string }) {
2624
};
2725
}, []);
2826
return (
29-
<div className={clsx("relative", className)}>
27+
<div className={clsx("relative", className)} data-visual-test="blackout">
3028
<div className="relative">
3129
<ChangesSvg className="mx-auto rounded border md:w-[50%]" />
3230
</div>

cypress/e2e/pages.cy.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const pages = [
88
{ name: "blog-post-1", path: "/blog/visual-testing" },
99
{ name: "blog-post-2", path: "/blog/improve-dx" },
1010
{ name: "blog-post-3", path: "/blog/playwright" },
11+
{ name: "blog-post-4", path: "/blog/screenshot-stabilization" },
1112
];
1213

1314
const viewports = ["macbook-16", "ipad-2", "iphone-8"];

0 commit comments

Comments
 (0)