HilfePage.tsx: accordion via <details>/<summary> (native, accessible, mobile-first); 9 sections in du-Form: Erste Schritte, Rennmaeuse, Becken, Wuerfe, Genetik, Stammbaum, Abgabe-Ablauf, Statistik, Datensicherung. All UI labels imported from de.ts (rename-safe); SCHECKE/Rex warnings verbatim from genetics.warnings. de.ts: de.nav.help + de.hilfe (title, subtitle, 9 section keys) AppShell.tsx: Hilfe (heart question mark) added to SECONDARY nav (Mehr-sheet on phone, sidebar on desktop) App.tsx: Route path=hilfe -> <HilfePage /> hilfe.css: accordion, hint boxes, warning colour; piggybacks on existing CSS vars e2e/hilfe.spec.ts: 3 smoke tests x 2 viewports = 6 new tests -- Hilfe reachable via nav -- First accordion section expands on click -- SCHECKE warning visible in Genetik section Full evidence: dotnet test 18/18, npm test 47/47, npm run build ok, npm run e2e 54/54 (48 existing + 6 new hilfe tests). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
/**
|
||
* HELP-1: Hilfe-Seite — Smoke-Test (erreichbar + Accordion öffnet sich).
|
||
* Kein Mock-API nötig (rein statische Seite).
|
||
*/
|
||
import { de, expect, gotoSection, test } from './fixtures'
|
||
|
||
const th = de.hilfe
|
||
|
||
test.describe('Hilfe', () => {
|
||
test('Hilfe-Seite ist über die Navigation erreichbar', async ({ page }) => {
|
||
await gotoSection(page, de.nav.help)
|
||
await expect(page.getByRole('heading', { name: th.title })).toBeVisible()
|
||
await expect(page.getByText(th.subtitle)).toBeVisible()
|
||
})
|
||
|
||
test('Akkordeon-Abschnitt öffnet sich per Tippen', async ({ page }) => {
|
||
await page.goto('/hilfe')
|
||
const firstSummary = page.getByText(th.sections.ersteSchritte)
|
||
await expect(firstSummary).toBeVisible()
|
||
|
||
// Abschnitt ist zunächst geschlossen — Inhalt nicht sichtbar
|
||
const sectionBody = page.getByText('Empfohlene Reihenfolge')
|
||
await expect(sectionBody).not.toBeVisible()
|
||
|
||
// Tippen öffnet den Abschnitt
|
||
await firstSummary.click()
|
||
await expect(sectionBody).toBeVisible()
|
||
})
|
||
|
||
test('SCHECKE-Warnung ist im Genetik-Abschnitt enthalten', async ({ page }) => {
|
||
await page.goto('/hilfe')
|
||
// Öffne Genetik-Abschnitt
|
||
await page.getByText(th.sections.genetik).click()
|
||
await expect(page.getByText('Schecke × Schecke', { exact: false })).toBeVisible()
|
||
})
|
||
})
|