import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; import { LicenceDelivery } from "./LicenceDelivery"; describe("LicenceDelivery", () => { it("offers the file and always shows the blob as a fallback", () => { render( , ); const link = screen.getByRole("link", { name: /download licence/i }); expect(link).toHaveAttribute("href", expect.stringContaining("/license/download")); // A blocked download must never leave a paying customer stuck. expect(screen.getByText(/VANTAGE-LIC abc123/)).toBeInTheDocument(); expect(screen.getByText(/Settings → Licence/)).toBeInTheDocument(); }); });