Skip to content

Add Core E2E Smoke & Regression Tests #915

@mattdjenkinson

Description

@mattdjenkinson

Add Core E2E Smoke & Regression Tests

Background

At the moment we only have a single, minimal E2E test that verifies unauthenticated users are redirected to the login page.

This does not give us enough confidence when shipping changes. To improve release safety, we should introduce a core suite of Cypress end-to-end tests that validate critical user flows and system functionality.

These tests should act as smoke tests for every PR targeting main.
If any smoke test fails, the PR must not be merged.


Goals

We want a maintainable, fast, and reliable E2E testing setup that:

  • Uses an authenticated test user
  • Covers core user journeys and critical system paths
  • Is easy to extend as new features and flows are added
  • Is easy to maintain and resilient to UI changes
  • Can be run locally and in CI
  • Fails fast to provide quick feedback on regressions

Proposed Approach

We can use the manual smoke tests we ran during the recent architecture change as the initial blueprint for automated Cypress tests.

Test Strategy

  • Smoke Tests

    • Run on every PR to main
    • Fast (≈2–3 minutes total)
    • Validate that the system is fundamentally usable
    • Any failure blocks merge
  • Regression Tests

    • Broader CRUD and edge-case coverage
    • Run after smoke tests pass (e.g. on main or nightly)

1. Smoke Tests (Cypress)

Quick validation after deployment or build.
If any test fails → stop and investigate.

1.1 Health & Authentication

Test Steps Expected Outcome
API responds GET /_healthz 200 OK
App loads Open app URL Login page renders
Login Login with test account Redirected to dashboard
Logout Logout via UI Redirected to login

1.2 Critical Pages Load

Test Steps Expected Outcome
Organizations Navigate to organizations List loads without errors
Projects Select org → projects List loads without errors
DNS Zones Navigate to DNS zones List loads without errors
Domains Navigate to domains List loads without errors
Secrets Navigate to secrets List loads without errors

2. Regression Tests (Cypress)

Full CRUD coverage per module.
These should only run once smoke tests have passed.


2.1 Authentication

Test Steps Expected Outcome
Session persist Refresh page after login User remains logged in
Logout Logout via UI Session cleared
Protected route Access protected route when logged out Redirected to login

2.2 Organizations

Test Steps Expected Outcome
List Navigate to organizations All orgs displayed
Create Create new organization Appears in list
Read Open organization Details page loads
Update Edit org name Changes reflected
List Navigate to organization quotas Quota list should be shown
Delete Delete test org Removed from list
Switch Use org switcher Context updates correctly

2.3 Projects

Test Steps Expected Outcome
List Navigate to projects All projects displayed
Create Create new project Appears in list
Read Open project Details page loads
Update Edit project name Changes reflected
List Navigate to project quotas Quota list should be shown
Delete Delete test project Removed from list
Switch Use project switcher Resources update correctly

2.4 Members & Invitations

Test Steps Expected Outcome
List members Navigate to team Members displayed
Invite member Invite via email Invitation pending
Resend invite Resend invite Success message
Cancel invite Cancel invite Invite removed
Remove member Remove member Member removed

2.5 DNS Zones & Records

Test Steps Expected Outcome
List zones Navigate to DNS zones Zones displayed
Create zone Create new zone Appears in list
Read zone Open zone Records load
Delete zone Delete test zone Removed from list
Create record Add DNS record Appears in list
Update record Edit record Changes reflected
Delete record Delete record Removed

2.6 Domains

Test Steps Expected Outcome
List Navigate to domains Domains displayed
Create Add domain Appears in list
Read Open domain Details load
Refresh status Refresh domain Status updates
Delete Delete domain Removed from list

2.7 Secrets

Test Steps Expected Outcome
List Navigate to secrets Secrets displayed
Create Create secret Appears in list
Read Open secret Details load
Add key-value Add key-value Appears in list
Update key-value Update value Changes reflected
Delete key-value Remove key-value Removed
Delete secret Delete secret Removed from list

2.8 HTTP Proxies

Test Steps Expected Outcome
List Navigate to proxies Proxies displayed
Create Create proxy Appears in list
Read Open proxy Details load
Update Update settings Changes reflected
Delete Delete proxy Removed

Acceptance Criteria

  • Cypress smoke tests run on PRs to main
  • Merge blocked if smoke tests fail
  • Authenticated user setup is shared and reusable
  • Tests are easy to maintain and extend
  • Tests run locally and in CI

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions