Shuffle/app/test
cschlaefke 87c0d7d1ec feat(auth): add password reset (forgot password, recovery link, new password)
ForgotPasswordScreen with neutral reaction (F12), CheckEmail reset mode on
its own path, recovery link handling and ResetPasswordScreen with the
recovery guard held until the user confirms the success message. Carries
the from parameter between login, register and forgot password. Removes
the route placeholders.

Refs #1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 09:47:03 +01:00
..
core feat(core): let AppBanner disable its action instead of hiding it 2026-11-03 09:47:03 +01:00
features/auth feat(auth): add password reset (forgot password, recovery link, new password) 2026-11-03 09:47:03 +01:00
helpers test: add pumpApp helpers, fakes and coverage matrix template 2026-11-02 20:21:55 +01:00
app_test.dart test: add pumpApp helpers, fakes and coverage matrix template 2026-11-02 20:21:55 +01:00
README.md fix(app): address review findings for foundation 2026-11-02 20:36:58 +01:00

Tests der App

Unit- und Widget-Tests spiegeln die Struktur von lib/. Integration (integration_test/) und Web-E2E (Playwright) kommen mit den jeweiligen Feature-Tasks.

flutter test

Coverage wird in der CI derzeit nicht erhoben; lokal optional flutter test --coverage.

Helfer (test/helpers/)

Datei Inhalt
pump_app.dart pumpApp(tester, home: …) bzw. router: …: MaterialApp mit AppTheme, l10n-Delegates, ProviderScope, wählbare locale (Standard de), textScale, themeMode. pumpShuffleApp(tester, deviceLocale: …) startet die echte ShuffleApp. Beide geben den ProviderContainer zurück.
fakes.dart MockSupabaseClient, MockGoTrueClient, SupabaseMocks (Client mit verdrahtetem auth), testAppConfig(…), testOverrides(…) (feste AppConfig + Supabase-Mock, weitere Overrides anhängbar).
router_helpers.dart buildTestRouter, FakeRedirectSource, currentPath, currentUri.

Regeln: keine echten Netzwerkaufrufe, feste Zeit (clock/fakeAsync), feste Zufallswerte. Schlägt ein Test wegen eines Produktivcode-Fehlers fehl, wird der Test nicht angepasst, sondern der Fehler an den Entwickler-Agent zurückgegeben.

Benennung mit Akzeptanzkriterien

Tests, die ein Akzeptanzkriterium belegen, tragen die Referenz KTO-01 Kriterium 3 (Story-ID, Kriterium-Nummer wie im Issue) am Anfang des Namens:

group('KTO-01 Kriterium 3: password policy', () {
  test('rejects passwords shorter than 10 characters', () { … });
});

testWidgets('KTO-01 Kriterium 7: shows a generic message for wrong credentials', …);
  • Eine Referenz pro group/Test; deckt ein Test mehrere Kriterien ab, alle nennen (KTO-01 Kriterium 1, 2).
  • Konfigurationsabhängige Tests nennen zusätzlich die Konfig-ID (AUTH-CFG-10).
  • Sprache der Testnamen einheitlich Englisch (wie der Code); die Referenz bleibt unverändert.
  • Suche nach Abdeckung: grep -rn "KTO-01 Kriterium 3" test integration_test ../supabase/tests ../e2e.

Abdeckungsmatrix

Jeder PR enthält eine Matrix Akzeptanzkriterium → Test(s). Vorlage: docs/templates/abdeckungsmatrix.md.