From 5a6f5d4d689221918fea14773e8ce1d5c5260456 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sat, 5 Sep 2026 08:51:22 -0700 Subject: [PATCH] fix: label remaining website and picture inputs (#3424) * fix: connect remaining website and picture labels to inputs * test(builder): use realistic website input events --- apps/web/src/libs/tanstack-form.test.tsx | 29 ++----- apps/web/src/libs/tanstack-form.tsx | 12 ++- .../-sidebar/left/sections/basics.tsx | 16 ++-- .../left/sections/field-labels.test.tsx | 86 +++++++++++++++++++ .../-sidebar/left/sections/picture.tsx | 32 ++++--- 5 files changed, 129 insertions(+), 46 deletions(-) create mode 100644 apps/web/src/routes/builder/$resumeId/-sidebar/left/sections/field-labels.test.tsx diff --git a/apps/web/src/libs/tanstack-form.test.tsx b/apps/web/src/libs/tanstack-form.test.tsx index 8219f260a..51f743e58 100644 --- a/apps/web/src/libs/tanstack-form.test.tsx +++ b/apps/web/src/libs/tanstack-form.test.tsx @@ -1,6 +1,5 @@ // @vitest-environment happy-dom -import type { Website } from "@reactive-resume/schema/resume/data"; import { render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { beforeAll, describe, expect, it, vi } from "vitest"; @@ -8,25 +7,6 @@ import { i18n } from "@lingui/core"; import { I18nProvider } from "@lingui/react"; import { useAppForm } from "./tanstack-form"; -vi.mock("@/components/input/url-input", () => ({ - URLInput: ({ - value, - onChange, - hideLabelButton, - }: { - value: Website; - onChange: (value: Website) => void; - hideLabelButton?: boolean; - }) => ( - onChange({ ...value, url: event.target.value })} - /> - ), -})); - vi.mock("@/components/input/rich-input", () => ({ RichInput: ({ value, onChange }: { value: string; onChange: (value: string) => void }) => (