Skip to content

fix: resolve playwright duplicate locators and patch legacy vitest flakes#1197

Open
Logesh-Pro wants to merge 6 commits into
Priyanshu-byte-coder:mainfrom
Logesh-Pro:fix-smoke-tests
Open

fix: resolve playwright duplicate locators and patch legacy vitest flakes#1197
Logesh-Pro wants to merge 6 commits into
Priyanshu-byte-coder:mainfrom
Logesh-Pro:fix-smoke-tests

Conversation

@Logesh-Pro
Copy link
Copy Markdown
Contributor

Summary

This PR addresses and resolves the critical test duplication and locator errors that were causing automated smoke and e2e test runs to fail, while also patching flaky legacy setup scripts in the vitest suite.

Closes # [Insert Issue Number here if you have one, otherwise delete this line]

Type of Change

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

Changes Made

  • Playwright E2E (landing.spec.js): Resolved duplicate element locators blocking the landing page flow.
  • Vitest (StreakTracker.test.ts): Replaced direct assignment of the read-only global.navigator object with a safe Object.defineProperty configuration descriptor to prevent environment runtime assignment crashes. Updated test log titles to avoid CI duplication conflicts.
  • Vitest (auth.test.ts): Synchronized the expected NextAuth configuration provider scope validation string with the actual application output (read:user user:email read:discussion).

How to Test

Steps for the reviewer to verify this works:

  1. Checkout this branch: git checkout fix-smoke-tests
  2. Run the unit test suite to verify 100% green pass rate: npx vitest run (280 tests should pass)
  3. Run the Playwright e2e test suite to verify landing page accessibility: npx playwright test e2e/landing.spec.js (4 tests should pass)

Screenshots (if UI change)

N/A (Test suite and configuration updates only)

Checklist

  • Linked issue in summary (if applicable)
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

@Logesh-Pro 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.

@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level:intermediate GSSoC: Intermediate difficulty (35 pts) labels May 27, 2026
@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR has a merge conflict with main. Please rebase your branch and resolve conflicts so we can merge it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts) labels May 27, 2026
@Logesh-Pro
Copy link
Copy Markdown
Contributor Author

Conflicts Resolved!

I have successfully updated the branch with the latest upstream changes from main and cleanly cleared out the tracking conflicts. The PR can now be safely and automatically merged.

All smoke tests and Vitest suites are verified and ready for your final review. Thanks again for assigning the intermediate milestones!

@Logesh-Pro Logesh-Pro force-pushed the fix-smoke-tests branch 2 times, most recently from 8e90bbc to 5170655 Compare May 27, 2026 08:16
@github-actions github-actions Bot added the type:devops GSSoC type bonus: devops (+15 pts) label May 27, 2026
@Logesh-Pro
Copy link
Copy Markdown
Contributor Author

Hi @Priyanshu-byte-coder,

I have cleanly merged the latest upstream updates from main into this branch. The code is fully up to date, and all 10 automated CI validation checks are completely green!

Ready for your final review and merge whenever you're free. Thanks

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

Hi! This PR has been approved (gssoc:approved) but has merge conflicts with the latest main. Please rebase your branch on main, resolve any conflicts, and push — we'll merge right away. Thank you for your contribution!

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR includes pnpm-workspace.yaml and pnpm-lock.yaml — this project uses npm, not pnpm. Please remove those files before this can be merged.

The Playwright test renaming (adding [Landing E2E] prefix) and Vitest fixes are welcome — just remove the pnpm artifacts.

@Logesh-Pro
Copy link
Copy Markdown
Contributor Author

Logesh-Pro commented May 28, 2026 via email

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 level:intermediate GSSoC: Intermediate difficulty (35 pts) type:bug GSSoC type bonus: bug fix type:devops GSSoC type bonus: devops (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants