Skip to content

test: add disabled state coverage for Watch Dashboard link#758

Closed
kanishka-2007-tech wants to merge 5 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:dashboard
Closed

test: add disabled state coverage for Watch Dashboard link#758
kanishka-2007-tech wants to merge 5 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:dashboard

Conversation

@kanishka-2007-tech
Copy link
Copy Markdown
Contributor

@kanishka-2007-tech kanishka-2007-tech commented May 27, 2026

Description

The Watch Dashboard link in app/page.tsx uses aria-disabled={!hasUsername} to prevent navigation when no username is provided. The disabled state behavior was not previously covered by tests.

Changes Made

  • Added test coverage for the disabled state of the Watch Dashboard link.
  • Verified the link has aria-disabled="true" when the username input is empty.
  • Verified the disabled state is removed after entering a valid username.
  • Ensured existing page tests continue to pass.

Test Scenarios

  • Render the page with an empty username and verify the Watch Dashboard link is disabled.
  • Enter a username and verify the disabled state is removed.

Fixes #709

Pillar

  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🛠️ Other (Bug fix, refactoring, docs)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

@kanishka-2007-tech is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label May 27, 2026
@github-actions
Copy link
Copy Markdown

🚨 Hey @kanishka-2007-tech, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@github-actions github-actions Bot added type:testing Adding, updating, or fixing tests needs-rebase This PR has merge conflicts and needs a rebase. labels May 27, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Hey @kanishka-2007-tech, this PR has merge conflicts with the main branch.

Please pull the latest changes and resolve the conflicts so we can review it!

git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-lease

Once resolved, the needs-rebase label will be removed automatically on the next check. 🙌

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

Labels

needs-rebase This PR has merge conflicts and needs a rebase. status:blocked This PR is blocked due to a failing CI check. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(LandingPage): verify Watch Dashboard link is disabled when username is empty

1 participant