Skip to content

test(frontend): add page.server tests for auth flows #450

Description

@fpindej

Problem

Four public routes with meaningful server-side logic have no page.server.test.ts coverage:

  • (public)/register/+page.server.ts - registration form action, captcha validation, redirect on success
  • (public)/forgot-password/+page.server.ts - form action, error handling
  • (public)/reset-password/+page.server.ts - token validation, redirect flows
  • (public)/verify-email/+page.server.ts - token consumption, redirect on success/failure

These are critical auth paths. The existing tests for login and oauth/callback demonstrate the exact pattern to follow.

Reference

  • src/frontend/src/routes/(public)/login/page.server.test.ts
  • src/frontend/src/routes/(public)/oauth/callback/page.server.test.ts

Scope

One test file per route, covering:

  • Happy path (successful form submission / token consumption)
  • Error paths (invalid input, backend errors, expired tokens)
  • Redirect behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend (SvelteKit)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions