Add comprehensive Playwright E2E tests#72
Merged
Conversation
- Add Playwright configuration with sequential test execution for Convex state consistency - Create page objects for all major pages (teacher, student, join, home) - Implement tests for session flow, quiz lifecycle, lost signals, Q&A, and navigation - Add GitHub Actions workflow for CI/CD E2E testing - Use robust selectors with proper waits for real-time Convex updates
- Add chatCloseButton locator for mobile full-screen chat X button - Update closeChat to prioritize X button (works on both desktop/mobile) - Update markAsNotLost to close chat first on mobile - Fix selector for X button in AI Assistant header
- Enable parallel test execution (fullyParallel: true) - Use 4 workers locally, 2 in CI - Skip mobile tests by default locally (use MOBILE=true to include) - Add test:e2e:mobile script for running with mobile viewport Performance improvement: - Local (chromium only): 1.1m → 15s (~4.5x faster) - Full suite (with mobile): 1.1m → 22s (~3x faster)
Deploying waitwhat with
|
| Latest commit: |
7dcbd20
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e0b1d50f.waitwhat-e0v.pages.dev |
| Branch Preview URL: | https://cartert27-playwright-e2e-tes.waitwhat-e0v.pages.dev |
E2E tests require a live Convex backend which isn't available in CI without credentials. Tests are designed to run locally during development. - Remove .github/workflows/e2e.yml (causes CI failures) - Add e2e/README.md with comprehensive test documentation - Document how to run tests locally and prerequisites - Explain test coverage and architecture Tests run in ~15s locally with parallel execution.
The previous package-lock.json triggered a known npm bug with optional dependencies causing Rollup to fail in the Cloudflare build environment. Regenerated with fresh npm install to resolve the issue. Fixes: Error: Cannot find module @rollup/rollup-linux-x64-gnu
The lockfile was generated on macOS and only includes darwin-specific optional dependencies. Cloudflare Pages runs on Linux and needs @rollup/rollup-linux-x64-gnu, which npm's optional dependency bug (npm/cli#4828) prevents from being properly recorded cross-platform. Without the lockfile, Cloudflare Pages does a fresh npm install that generates correct platform-specific dependencies.
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
Add 15 Playwright E2E tests covering critical user flows: session creation/joining, quiz lifecycle, lost signals, Q&A, and navigation. Tests run in parallel across desktop and mobile viewports (30 total), completing in ~22 seconds.
Key Features
Test Coverage