Files
Rosea/packages/ui/test/Shell.test.ts
mnovak 49c8def037 [repo] Workspace: Scaffold Phase 0 with schema, engine, content, ui and the PWA shell
pnpm + turbo workspace with the commands from CLAUDE.md §3. The contracts
from §6 as JSON Schemas with generated types; localDay as the one place a
day is computed; the forbidden-word list shared by lint:copy and the
library validator, with 13 negative fixtures; a Svelte 5 PWA shell built
under /Rosea/ with a meta CSP. E2E and offline suites run against the
built bundle; the offline one closes the server rather than emulating.

Analysis: .agents/features/phase0-workspace.md
2026-11-01 00:27:33 +01:00

27 lines
906 B
TypeScript

import { PRODUCT_NAME } from '@rosea/schema';
import { cleanup, render, screen } from '@testing-library/svelte';
import { afterEach, describe, expect, it } from 'vitest';
import Shell from '../src/Shell.svelte';
import { en } from '../src/copy/en.js';
afterEach(cleanup);
describe('Shell', () => {
it('names the product in the page heading, from the schema constant', () => {
render(Shell);
expect(screen.getByRole('heading', { level: 1 }).textContent).toBe(PRODUCT_NAME);
});
it('shows its one line from copy/, and no control to press', () => {
render(Shell);
expect(screen.getByText(en.shell.preparing)).toBeTruthy();
expect(screen.queryAllByRole('button')).toEqual([]);
expect(screen.queryAllByRole('link')).toEqual([]);
});
it('is a landmark, so a screen reader can find it', () => {
render(Shell);
expect(screen.getByRole('main')).toBeTruthy();
});
});