feat: Setup Playwright E2E testing and optimize performance#646
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Playwright end-to-end coverage and CI automation while adjusting app/runtime configuration to be more resilient in E2E runs and reducing client bundle weight.
Changes:
- Introduces Playwright E2E specs (login, profile settings, roadmap navigation) and a GitHub Actions workflow to run them.
- Adjusts Next/Playwright/Firebase-related config for E2E stability (E2E env flags, navigation timeouts, db/auth bypasses).
- Improves performance via deferred/dynamic loading (Three.js hero scene + confetti) and updates Tailwind plugin wiring.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Excludes Jest config from TS compilation scope. |
| playwright.config.ts | Makes E2E runs sequential/single-worker with longer timeouts + E2E env injection. |
| .github/workflows/playwright.yml | Adds CI workflow to run Playwright and upload reports on failure. |
| next.config.ts | Disables output: 'export' during E2E runs to support middleware/dev server. |
| src/lib/firebase.ts | Changes prod missing-env behavior from throw to warn. |
| src/hooks/useMaintenance.ts | Skips maintenance checks during E2E runs. |
| src/context/AuthContext.tsx | Adds E2E detection and optional mock auth via localStorage flag. |
| src/components/resources/QuizComponent.tsx | Lazy-loads canvas-confetti to reduce initial bundle. |
| src/components/home/Hero.tsx | Defers 3D header scene until hero enters viewport. |
| src/components/NotificationDropdown.tsx | Avoids notification reads/writes when db is unavailable. |
| tailwind.config.ts | Switches Tailwind animate plugin to ESM import usage. |
| tests/e2e/*.spec.ts | Adds/updates Playwright tests for key routes and UI states. |
| package.json | Updates dev dependencies (Jest/Firebase tools/cross-env). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Great job @NiksheyYadav on your first PR! The E2E test setup with Playwright looks solid and covers all the essential flows perfectly. Approved and merging!
As your changes seems to have solved two issues!
I am giving the quality:exceptional labels for this PR taking into account these parameters.
Welcome to our Repository, Good Luck for future PRs!
Do star the Repository if not already!
bc0c8e9
into
devpathindcommunity-india:master
Closes #642. Closes #640.
Adds comprehensive Playwright testing for core user flows (Login, Profile, Roadmap) and fixes performance issues with static exports.