feat: add comprehensive playwright test suite for dashboard#1476
Open
simplesagar wants to merge 5 commits intomainfrom
Open
feat: add comprehensive playwright test suite for dashboard#1476simplesagar wants to merge 5 commits intomainfrom
simplesagar wants to merge 5 commits intomainfrom
Conversation
- Add Playwright configuration with multi-browser support - Create test fixtures for auth, navigation, and common utilities - Implement test suites for key features: - Authentication (login, register, redirects) - Home dashboard (quick test, navigation, toolsets display) - Toolsets (list, create, CRUD operations) - Playground (chat, toolset selection, logs panel) - Deployments (list, actions, status indicators) - Settings (API keys, custom domains) - Add npm scripts for running tests in various modes
|
Add the following mise tasks: - mise test:e2e - Run all E2E tests - mise test:e2e-ui - Run tests with interactive UI - mise test:e2e-headed - Run tests in headed browser mode - mise test:e2e-debug - Run tests in debug mode
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
🚀 Preview Environment (PR #1476)Preview URL: https://pr-1476.dev.getgram.ai
Gram Preview Bot |
The authenticatedPage fixture now properly loads the auth state from the file path specified in PLAYWRIGHT_AUTH_STATE_PATH using Playwright's storageState option when creating a new browser context. Also adds authenticatedContext fixture for cases where tests need direct access to the browser context.
- All e2e tasks now support --auth <path> to specify auth state file - Add mise test:e2e-auth task to interactively generate auth state - Add auth state files to .gitignore (contain session tokens) Usage: # Generate auth state by logging in mise test:e2e-auth # Run tests with auth state mise test:e2e --auth client/dashboard/e2e/.auth-state.json
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.
Summary
This PR adds a complete end-to-end test suite for the Gram Dashboard using Playwright. The test suite covers critical user flows including authentication, deployments, playground functionality, settings management, and home dashboard features.
Key Changes
Test Fixtures (
e2e/fixtures/test-fixtures.ts): Created reusable test fixtures and page helpers for:Authentication Tests (
e2e/auth.spec.ts): Comprehensive auth flow coverage:Deployments Tests (
e2e/deployments.spec.ts): Full deployment management coverage:Playground Tests (
e2e/playground.spec.ts): Interactive testing features:Settings Tests (
e2e/settings.spec.ts): Settings management coverage:Home Dashboard Tests (
e2e/home.spec.ts): Home page features:Git Configuration (
.gitignore): Added Playwright artifacts to ignore listImplementation Details
test.skip()with environment variable checks to gracefully skip tests requiring authentication when not availableTesting Requirements
Tests requiring authentication can be run with:
PLAYWRIGHT_AUTH_STATE_PATH=path/to/auth.json npx playwright testWithout authentication state, tests will skip gracefully and only run unauthenticated flows.
https://claude.ai/code/session_01HbPak4VsrMgkrDm45QDzGq