From 7a0004e052e4bdb4f22fb0a22f574b5f5a356bfe Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:16:03 +0800 Subject: [PATCH] test: refresh stale component snapshots to green the suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 3 snapshot suites had drifted from intentional component polish — Button gained `accessibilityRole="button"`, busy/disabled a11y states, a `gap-2` press-scale animation (`active:scale-[0.98]`), and SearchBar gained an accessibility label, `returnKeyType="search"`, and a clear button. The diffs are purely additive (a11y + UX), not regressions, so the snapshots were simply out of date. Update them with `jest -u`. Full suite is now green: 1161 passed, 0 failed. Co-Authored-By: Claude Opus 4.8 --- .../common-components.test.tsx.snap | 49 +++++++++++++++ .../ui-components-extended.test.tsx.snap | 32 ++++++---- .../__snapshots__/ui-components.test.tsx.snap | 61 +++++++++++-------- 3 files changed, 103 insertions(+), 39 deletions(-) diff --git a/__tests__/snapshots/__snapshots__/common-components.test.tsx.snap b/__tests__/snapshots/__snapshots__/common-components.test.tsx.snap index a750b96..f8314aa 100644 --- a/__tests__/snapshots/__snapshots__/common-components.test.tsx.snap +++ b/__tests__/snapshots/__snapshots__/common-components.test.tsx.snap @@ -99,10 +99,13 @@ exports[`SearchBar snapshots renders with custom placeholder 1`] = ` size={18} /> @@ -117,10 +120,13 @@ exports[`SearchBar snapshots renders with default placeholder 1`] = ` size={18} /> @@ -135,11 +141,54 @@ exports[`SearchBar snapshots renders with value 1`] = ` size={18} /> + + + `; diff --git a/__tests__/snapshots/__snapshots__/ui-components-extended.test.tsx.snap b/__tests__/snapshots/__snapshots__/ui-components-extended.test.tsx.snap index 951f467..8e7c8df 100644 --- a/__tests__/snapshots/__snapshots__/ui-components-extended.test.tsx.snap +++ b/__tests__/snapshots/__snapshots__/ui-components-extended.test.tsx.snap @@ -58,7 +58,7 @@ exports[`Checkbox snapshots renders checked 1`] = ` { "busy": undefined, "checked": true, - "disabled": undefined, + "disabled": false, "expanded": undefined, "selected": undefined, } @@ -72,9 +72,10 @@ exports[`Checkbox snapshots renders checked 1`] = ` } } accessible={true} - className="h-5 w-5 items-center justify-center rounded border border-primary bg-primary" + className="h-5 w-5 items-center justify-center rounded border border-primary bg-primary active:opacity-70" collapsable={false} focusable={true} + hitSlop={8} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -87,7 +88,7 @@ exports[`Checkbox snapshots renders checked 1`] = ` role="checkbox" > @@ -116,6 +117,7 @@ exports[`Checkbox snapshots renders disabled 1`] = ` className="h-5 w-5 items-center justify-center rounded border border-input bg-background opacity-50" collapsable={false} focusable={true} + hitSlop={8} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -135,7 +137,7 @@ exports[`Checkbox snapshots renders unchecked 1`] = ` { "busy": undefined, "checked": false, - "disabled": undefined, + "disabled": false, "expanded": undefined, "selected": undefined, } @@ -149,9 +151,10 @@ exports[`Checkbox snapshots renders unchecked 1`] = ` } } accessible={true} - className="h-5 w-5 items-center justify-center rounded border border-input bg-background" + className="h-5 w-5 items-center justify-center rounded border border-input bg-background active:opacity-70" collapsable={false} focusable={true} + hitSlop={8} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -167,10 +170,10 @@ exports[`Checkbox snapshots renders unchecked 1`] = ` exports[`Input snapshots renders default input 1`] = `