QA-1: smoke specs - Navigation, Tiere CRUD+Tabs, Becken/Kontakte+409, Wuerfe+Jungtier, Probeverpaarung+SCHECKE-Warnung, Stammbaum re-root+print, Statistik (24 flows x 2 viewports, German assertions)

This commit is contained in:
2026-06-06 07:16:52 +02:00
parent ec5e755e72
commit ebd61d73a5
7 changed files with 387 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
/** QA-1: Genetik (FEAT-5/GEN-1) — Probeverpaarung inkl. SCHECKE-Warnung. */
import { de, expect, gotoSection, test } from './fixtures'
const t = de.pages.genetik
function genotypeInput(page: import('@playwright/test').Page, parent: string) {
return page
.locator('fieldset.parent-selector')
.filter({ has: page.getByText(parent, { exact: true }) })
.getByLabel(t.genotypeLabel)
}
test('Probeverpaarung rechnet client-seitig und zeigt Nachkommen-Farbschläge', async ({ page }) => {
await gotoSection(page, de.nav.genetics)
await expect(page.getByText(t.subtitle)).toBeVisible()
await expect(page.getByText(t.needBoth)).toBeVisible()
await genotypeInput(page, t.father).fill('AA CC DD EE GG PP spsp rere')
await genotypeInput(page, t.mother).fill('aa CC DD EE GG PP spsp rere')
await expect(page.getByRole('heading', { name: t.resultsTitle })).toBeVisible()
// AA × aa -> alle Nachkommen Aa = Agouti (Farbschlag-Karte)
await expect(page.locator('.farbschlag-card').filter({ hasText: 'Agouti' }).first()).toBeVisible()
})
test('Schecke × Schecke zeigt die deutsche Letalwarnung', async ({ page }) => {
await gotoSection(page, de.nav.genetics)
// Beide Eltern Spsp (Schecke): SpSp ist letal -> Warnhinweis
await genotypeInput(page, t.father).fill('Aa CC DD EE GG PP Spsp rere')
await genotypeInput(page, t.mother).fill('Aa CC DD EE GG PP Spsp rere')
await expect(page.getByRole('heading', { name: t.warningsTitle })).toBeVisible()
await expect(page.getByText(de.genetics.warnings.SCHECKE_LETHAL)).toBeVisible()
})
test('ungültiger Genotyp zeigt die deutsche Fehlermeldung', async ({ page }) => {
await gotoSection(page, de.nav.genetics)
await genotypeInput(page, t.father).fill('kein genotyp')
await expect(page.getByText(t.genotypeInvalid)).toBeVisible()
})