Skip to content

feat: add Playwright E2E test suite for auth, dashboard, goals, streak, and API routes#2127

Merged
Priyanshu-byte-coder merged 1 commit into
Priyanshu-byte-coder:mainfrom
IshitaSingh0822:feat/e2e-playwright-suite
Jun 8, 2026
Merged

feat: add Playwright E2E test suite for auth, dashboard, goals, streak, and API routes#2127
Priyanshu-byte-coder merged 1 commit into
Priyanshu-byte-coder:mainfrom
IshitaSingh0822:feat/e2e-playwright-suite

Conversation

@IshitaSingh0822
Copy link
Copy Markdown
Contributor

Summary

Adds a Playwright E2E test suite to DevTrack covering auth flow, dashboard widget rendering, goals CRUD, streak widget, and critical API routes.
Closes #2120


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Added e2e/auth.spec.ts — landing page load, sign-in button visible, OAuth redirect fires, unauthenticated dashboard redirects
  • Added e2e/dashboard.spec.ts — mock login via encode() + addCookies(), all 6 widgets render, no uncaught console errors
  • Added e2e/goals.spec.ts — create goal POST fires with correct payload, goal appears in list, delete removes it
  • Added e2e/streak.spec.ts — current/longest streak values visible, freeze button present and triggers API call
  • Added e2e/api.spec.ts/api/metrics/contributions returns 200 with valid session, 401 without; goals POST returns 401 without session
  • Updated README.md with E2E test suite documentation, spec table, and local run instructions

How to Test

  1. Install Playwright browsers: npx playwright install --with-deps chromium
  2. Run the full suite: npm run test:e2e
  3. Run a single spec: npx playwright test e2e/goals.spec.ts
  4. View HTML report: npx playwright show-report

No real GitHub or Supabase credentials required — all external calls are mocked via page.route().


Screenshots (if UI change)

N/A


Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

Accessibility Checklist

  • Proper keyboard navigation tested
  • Responsive UI verified
  • Accessibility labels added where needed

Additional Notes

All 5 spec files have at least 3 assertions each. No real tokens needed in CI — mocked via page.route(). Existing specs (landing.spec.js, auth-bypass.spec.js, etc.) are untouched.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2026

@IshitaSingh0822 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:docs GSSoC type bonus: documentation (+5 pts) type:feature GSSoC type bonus: new feature type:security GSSoC type bonus: security (+20 pts) type:testing GSSoC type bonus: tests (+10 pts) labels Jun 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level3 GSSoC Level 3 - Advanced (45 points) quality:clean GSSoC: Clean quality multiplier (×1.2) labels Jun 8, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder merged commit 84e5fe5 into Priyanshu-byte-coder:main Jun 8, 2026
12 of 13 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level3 GSSoC Level 3 - Advanced (45 points) quality:clean GSSoC: Clean quality multiplier (×1.2) type:design GSSoC type bonus: UI/design (+10 pts) type:docs GSSoC type bonus: documentation (+5 pts) type:feature GSSoC type bonus: new feature type:security GSSoC type bonus: security (+20 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] End-to-end test suite with Playwright — cover auth flow, dashboard render, and API routes

2 participants