Repository navigation
Conversation
- Install @playwright/test and configure Chromium - Add playwright.config.ts with admin and frontend projects - Create test fixtures: test-users, auth, and tenant - Add npm scripts for running E2E tests - Update .gitignore for Playwright artifacts Co-Authored-By: Claude Opus 4.5 <[email protected]>
Contributor
Contributor
|
🚀 This is included in version v1.9.0 |
This branch was previously deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds a comprehensive Playwright E2E test suite for the admin panel, covering login, logout, tenant selector behavior across user roles type and verify what they can/cannot access, and tenant cookie edge cases.
Also adds the E2E job to CI to only run on merge.
Related Issues
Foundational e2e test infrastructure Fixes #866
Key Changes
Test files (7 spec files, 18 supporting files):
login.e2e.spec.ts— Login for all user roles, invalid credential errors, logout via nav buttonrole-based.e2e.spec.ts— Tenant selector visibility/options for super admin, multi-center admin, single-center admintenant-required.e2e.spec.ts— Tenant selector on list/create/edit views for tenant-scoped collectionsglobal-collections.e2e.spec.ts— Tenant selector on collections withunique: true(settings, navigations, homePages)non-tenant.e2e.spec.ts— Tenant selector hidden on non-tenant collections (users, tenants, etc.)payload-globals.e2e.spec.ts— Tenant selector hidden on Payload globalstenant-cookie-edge-cases.e2e.spec.ts— Behavior with no cookie, invalid cookie, cleared cookieTest infrastructure:
auth.fixture.ts,tenant-selector.fixture.ts,nav.fixture.ts,test-users.tslogin.ts(retry-based login),admin-url.ts,select-input.ts(react-select),tenant-cookie.ts,save-doc.tsplaywright.config.tswithadminandfrontendprojectsdocs/testing.md— setup, running, writing tests, known issuesCI:
e2ejob inci.yaml: seeds DB, builds, starts server, runs Playwright tests, uploads report artifactOther:
LogoutButtonto a client component (was needed for button-based logout)How to test
Screenshots / Demo video
N/A — test suite
Future enhancements / Questions
frontendPlaywright project is configured but has no tests yettest.fixmelogout test:/admin/logoutdirect navigation doesn't redirect to login without Edge Config — needs investigation