Skip to content

Testing & Reliability: Introduce Playwright End-to-End (E2E) tests for container resilience #1064

@aniruddhaadak80

Description

@aniruddhaadak80

Problem Description

Currently, the \prompts.chat\ codebase validates isolated logic components using Vitest, which is great for unit testing. However, recent infrastructure-level bugs (such as #1025 or #1039 causing fatal crashed during Docker deployment & NextAuth initialization) have bypassed these checks because unit tests inherently mock server environments and do not execute integration logic inside actual browsers against live builds.

As a self-hosted platform dealing with dynamic authentication configurations (Email, OAuth providers) and real-time database schema states, standard regressions easily leak into releases.

Proposed Solution

Integrate Playwright End-to-End (E2E) testing framework into the project.

  1. Add a Playwright configuration executing tests against a transient test database and container build.
  2. Implement critical path E2E sweeps matching user workflows:
    • Environment Validation: Verify the Next.js process starts correctly under Docker and does not face initial configuration crashes.
    • Auth Flows: Verify the credential sign-in and sign-out logic successfully creates a session.
    • Core CRUD: Test creating, modifying, and destroying a prompt.

Impact

Adding Playwright allows GitHub action pipelines to physically emulate user behaviors, catching 500 errors, layout shifts, or environment orchestration crashes reliably before merging code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions