Skip to content

[QA-01] Set up Playwright E2E test suite for critical user flows #1051

Description

@yusuftomilola

Overview

There are no end-to-end tests. Changes to auth, asset CRUD, or navigation can silently break the application without any automated signal. Playwright tests covering the golden paths give the team confidence before merging PRs and catch regressions in integration with the real backend.

Context

  • Frontend is a Next.js app in frontend/
  • Playwright supports Next.js projects natively via @playwright/test
  • Tests should run against a local dev server (next dev) with a seeded test database
  • CI integration follows in QA-03

Acceptance Criteria

  • Install @playwright/test as a dev dependency in frontend/package.json
  • Add playwright.config.ts targeting http://localhost:3000 with Chromium as the default browser
  • Write E2E test: auth.spec.ts — register new user, verify redirect to dashboard, logout, verify redirect to login
  • Write E2E test: login.spec.ts — valid credentials login, invalid credentials shows error, forgot password form submits and shows success state
  • Write E2E test: asset-crud.spec.ts — create asset (fill form, submit, verify in list), view asset detail, edit asset, delete asset with confirmation
  • Write E2E test: navigation.spec.ts — verify all sidebar links navigate to the correct page without a 404 or blank render
  • Add test:e2e script to frontend/package.json: playwright test

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTests, QA, and quality assurance

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions