1import { render } from "npm:preact-render-to-string@6.7.0";2import { TicketEnrollForm } from "./TicketEnrollForm.tsx";34// The form's manager-facing semantics are the contract: password managers key5// on a real form with a current-password field, a username companion, and a6// genuine submit button. These assertions pin exactly the markup those7// heuristics need.8Deno.test("TicketEnrollForm renders password-manager-compatible form semantics", () => {9 const html = render(<TicketEnrollForm />);10 for (11 const needle of [12 "<form",13 'type="password"',14 'autocomplete="current-password"',15 'autocomplete="username"',16 'type="submit"',17 ]18 ) {19 if (!html.includes(needle)) throw new Error(`manager-facing markup omitted: ${needle}`);20 }21});2223Deno.test("TicketEnrollForm states the custody story without overclaiming", () => {24 const html = render(<TicketEnrollForm />);25 if (!html.includes("bearer credential")) {26 throw new Error("the ticket's bearer nature was hidden");27 }28 if (!html.includes("password manager")) {29 throw new Error("the manager custody guidance was omitted");30 }31});