-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add comprehensive E2E test suite for Plane #8807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vlordier
wants to merge
2
commits into
makeplane:preview
Choose a base branch
from
vlordier:e2e-test-suite
base: preview
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+678
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # Plane E2E Smoke Test Suite | ||
|
|
||
| This directory contains browser-based E2E smoke tests for a **live Plane deployment**, using | ||
| Playwright. They complement (not replace) the Python unit and contract tests already in this | ||
| repository (`tests/unit/` and `tests/contract/`). | ||
|
|
||
| ## Relationship to other tests in this repo | ||
|
|
||
| | Layer | Location | What it tests | | ||
| | --- | --- | --- | | ||
| | Unit | `tests/unit/` | Isolated model/serializer/utility logic | | ||
| | Contract | `tests/contract/` | API endpoint contracts via Django test client | | ||
| | Smoke (Python) | `tests/smoke/test_auth_smoke.py` | Auth endpoint reachability against a running server | | ||
| | **E2E (this dir)** | `tests/smoke/test_plane_e2e.js` | Full browser flow on a live deployment | | ||
|
|
||
| The E2E test exercises browser login, SPA hydration, UI navigation, and endpoint reachability | ||
| end-to-end. It intentionally covers some of the same endpoints as the contract tests (cycles, | ||
| labels, projects, issues) but at the integration level — verifying the whole stack including | ||
| web server, auth cookies, and client-side routing rather than just the Django layer in isolation. | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Install dependencies: | ||
| ```bash | ||
| npm install playwright | ||
| npx playwright install chromium | ||
| ``` | ||
|
|
||
| 2. Export environment variables for your target deployment: | ||
|
|
||
| | Variable | Default | Description | | ||
| | --- | --- | --- | | ||
| | `PLANE_BASE_URL` | `http://localhost` | Base URL of the Plane instance | | ||
| | `PLANE_EMAIL` | `admin@plane.local` | Login email | | ||
| | `PLANE_PASSWORD` | `admin` | Login password | | ||
| | `PLANE_WORKSPACE_SLUG` | `my-workspace` | Workspace slug to test against | | ||
|
|
||
| 3. Run tests: | ||
| ```bash | ||
| export PLANE_BASE_URL=https://your-plane-instance.example.com | ||
| export PLANE_EMAIL=you@example.com | ||
| export PLANE_PASSWORD=yourpassword | ||
| export PLANE_WORKSPACE_SLUG=your-workspace | ||
|
|
||
| node test_plane_e2e.js | ||
| ``` | ||
|
|
||
| ## Test Coverage | ||
|
|
||
| This E2E test suite verifies: | ||
|
|
||
| - **Authentication**: Login, workspace redirect (browser flow) | ||
| - **Instance & Workspace APIs**: `/api/instances/`, `/api/users/me/`, workspaces | ||
| - **Project APIs**: List, create, detail | ||
| - **Issues/Work Items**: Create, list, delete | ||
| - **States, Labels**: List endpoints | ||
| - **Cycles**: List, create, delete | ||
| - **Modules**: List, create, delete | ||
| - **Pages**: List endpoint | ||
| - **Members & Invitations**: Reachability | ||
| - **User Favorites, Stickies, Quick Links, Recent Visits, Notifications, Estimates** | ||
| - **UI Navigation**: Projects page, dashboard, workspace settings, members settings | ||
| - **Security**: No mixed content errors, no critical JS errors | ||
| - **Cleanup**: All test data deleted on completion | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo uses pnpm (see root packageManager), but the README instructs
npm install playwright. Consider updating these commands to pnpm (or clarify that this script intentionally uses standalone npm) so contributors follow the repo’s standard tooling.