Phase 8: share panel, polish, accessibility and deploy config
- Share links section: scoreboard link, every judged game's judge links and open link with QR codes, and 'Copy all judge links' as plain text for WhatsApp. Warns when links point at localhost. - Error and not-found pages with plain-language copy; a real start page. - Accessibility: darker 'alert strong' red for text and white-on-red (Alert was 4.0:1 on white), no text below 70% ink, 44px block buttons and link targets, scoreboard status stays readable when idle. - vercel.json pins functions to Dublin next to the West EU database; README documents deployment and pre-game-night checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@/lib/env.public", () => ({ publicEnv: { NEXT_PUBLIC_SITE_URL: "https://gamenight.example" } }));
|
||||
|
||||
const { judgeLinksText } = await import("./share-panel");
|
||||
|
||||
const judge = (name: string, token: string, revoked = false) =>
|
||||
({ id: token, game_id: "g", name, token, revoked, source: "nominated", created_at: "" }) as const;
|
||||
|
||||
describe("judgeLinksText", () => {
|
||||
it("lists one line per active judge, skipping revoked ones", () => {
|
||||
const text = judgeLinksText({
|
||||
title: "Karaoke",
|
||||
judges: [judge("Eben", "aaa"), judge("Gone", "bbb", true), judge("Melissa", "ccc")],
|
||||
});
|
||||
expect(text).toBe(
|
||||
"Karaoke — judge links\nEben: https://gamenight.example/j/aaa\nMelissa: https://gamenight.example/j/ccc",
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user