diff --git a/e2e/home.spec.ts b/e2e/home.spec.ts index 707ef12..9885c26 100644 --- a/e2e/home.spec.ts +++ b/e2e/home.spec.ts @@ -14,5 +14,5 @@ test("home page and health endpoint are reachable", async ({ page, request }) => await expect(page.getByRole("heading", { level: 1, name: "TraceMap" })).toBeVisible(); await expect(page.getByRole("button", { name: "Start Investigation" })).toBeVisible(); - await expect(page.getByTestId("manual-source-urls-input")).toBeVisible(); + await expect(page.getByTestId("manual-source-url-input")).toBeVisible(); }); diff --git a/specs/manual-source-url-intake.md b/specs/manual-source-url-intake.md index 28f37a5..f8d37d1 100644 --- a/specs/manual-source-url-intake.md +++ b/specs/manual-source-url-intake.md @@ -45,7 +45,9 @@ Allow users to submit optional source URLs from the landing page so Investigatio - Label: `Optional source URLs`. - Help text: `Add one URL per line. TraceMap will prioritize these sources when building the evidence map.` - Name: `sourceUrls`. -- `data-testid="manual-source-urls-input"`. +- `data-testid="manual-source-url-input"` for textarea input. +- `data-testid="manual-source-url-help"` for help text. +- `data-testid="manual-source-url-error"` for invalid URL validation message. - Optional input, empty means existing behavior. - Validation error can be shown near existing form error region. diff --git a/src/features/landing/components/question-intake.tsx b/src/features/landing/components/question-intake.tsx index 5046460..f30e1ea 100644 --- a/src/features/landing/components/question-intake.tsx +++ b/src/features/landing/components/question-intake.tsx @@ -7,6 +7,7 @@ import { createMockRunAction, type CreateRunFormState, } from "@/app/actions/create-run"; +import { MANUAL_SOURCE_URLS_ERROR_MESSAGE } from "@/app/actions/manual-source-urls"; import { Panel } from "@/components/ui/panel"; const initialState: CreateRunFormState = {}; @@ -60,7 +61,11 @@ export function QuestionIntake({ disabled = false }: { disabled?: boolean }) { -
+
Add one URL per line. TraceMap will prioritize these sources when building the evidence map.