Files
Magent/frontend/app/ui/branding.test.tsx
T

38 lines
1.4 KiB
TypeScript

import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import ComingSoonPage from "../coming-soon/page";
import HowItWorksPage from "../how-it-works/page";
import AuthLayout from "./AuthLayout";
describe("portable default branding", () => {
it("uses Magent branding without replacing the supplied sign-in content", () => {
const html = renderToStaticMarkup(
<AuthLayout title="Welcome to our library" description="Use your account" footer="Local help">
<p>A custom message</p>
</AuthLayout>,
);
expect(html).toContain("Magent · Request. Watch. Enjoy.");
expect(html).toContain("Welcome to our library");
expect(html).toContain("A custom message");
expect(html).toContain("Local help");
expect(html).not.toMatch(/grizzlyflix/i);
expect(html).not.toContain(">Beta<");
});
it("shows a generic coming-soon page", () => {
const html = renderToStaticMarkup(<ComingSoonPage />);
expect(html).toContain("MAGENT");
expect(html).toContain("Your media member portal");
expect(html).not.toMatch(/grizzlyflix/i);
});
it("explains the Jellyfin integration without a deployment-specific service name", () => {
const html = renderToStaticMarkup(<HowItWorksPage />);
expect(html).toContain("Jellyfin is where you watch them.");
expect(html).not.toMatch(/grizzlyflix/i);
});
});