import type { UpdateSettingsInput } from "@shared/settings-schema.js"; import { render, screen } from "@testing-library/react"; import { FormProvider, useForm } from "react-hook-form"; import { Accordion } from "@/components/ui/accordion"; import { WebhooksSection } from "./WebhooksSection"; const WebhooksHarness = () => { const methods = useForm({ defaultValues: { pipelineWebhookUrl: "https://pipeline.com", jobCompleteWebhookUrl: "https://job.com", webhookSecret: "", }, }); return ( ); }; describe("WebhooksSection", () => { it("renders both webhook sections and the secret", () => { render(); expect(screen.getByText("Pipeline Status")).toBeInTheDocument(); expect(screen.getByText("Job Completion")).toBeInTheDocument(); expect( screen.getByDisplayValue("https://pipeline.com"), ).toBeInTheDocument(); expect(screen.getByDisplayValue("https://job.com")).toBeInTheDocument(); expect(screen.getByText("sec-********")).toBeInTheDocument(); }); });