-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
Description
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.
- Add a Playwright configuration executing tests against a transient test database and container build.
- 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
Labels
Projects
Status