import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { GuestGate } from '@/components/guest-gate'; // next/link needs the App Router context to mount. The sign-in link is // incidental to the validation branches under test, so stub it to an anchor. vi.mock('next/link', () => ({ default: ({ href, children }: { href: string; children: React.ReactNode }) => ( {children} ), })); const STORAGE_KEY = 'openframe_guest_name'; function renderGate() { return render(

Gated video page

); } /** * ACCESSIBILITY FINDING: the name field has no