Skip to content

test: add empty fallback coverage for ShareButtons#5765

Merged
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
Nilamma19:sharebuttons-empty-fallback-tests
Jun 15, 2026
Merged

test: add empty fallback coverage for ShareButtons#5765
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
Nilamma19:sharebuttons-empty-fallback-tests

Conversation

@Nilamma19

@Nilamma19 Nilamma19 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Adds edge-case and empty-input test coverage for ShareButtons through a dedicated fallback-focused test suite.

Changes Made
Created components/ShareButtons.empty-fallback.test.tsx
Added coverage for empty, missing, and partially configured inputs
Verified component stability when optional values are omitted
Validated rendering behavior for empty-state scenarios
Confirmed DOM structure remains intact and no runtime failures occur

Fixes #4250

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

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

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@Nilamma19 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 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3433.75 KB 3433.75 KB 0 B
Total CSS 258.05 KB 258.05 KB 0 B

@Aamod007 Aamod007 added level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. mentor:Aamod007 type:testing Adding, updating, or fixing tests labels Jun 15, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the ShareButtons empty-fallback coverage. I reviewed the PR description, linked issue #4250, status checks, and the actual diff before labeling.

Labels applied:

  • level:beginner: the change is one focused 88-line test file, components/ShareButtons.empty-fallback.test.tsx, covering required-only render, missing title, empty URL, undefined title, and DOM/security attributes in lines 6-88.
  • quality:clean: the cases are direct, readable, and assert specific link hrefs, target/rel attributes, and icon structure without broad snapshots.
  • type:testing: the PR adds Vitest/Testing Library coverage for ShareButtons, matching issue #4250's empty/missing-input test objective.

I am leaving this as a neutral review rather than approving because the PR status is currently UNSTABLE: the repo CI checks are green, but the Vercel status context is failing and points to a Vercel authorization URL. This looks like a deployment integration/auth issue rather than a test-code failure.

How to unblock it:

  1. A maintainer with Vercel access should re-authorize or reconnect the Vercel GitHub integration for this repo/team.
  2. Re-run the Vercel deployment/status check after authorization is fixed.
  3. Once the Vercel status is green or confirmed non-required by maintainers, this can be approved and receive gssoc:approved.

@Aamod007 Aamod007 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 15, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good fallback coverage. components/ShareButtons.empty-fallback.test.tsx keeps the component honest for empty selection, missing IDs, and blank link state, and the assertions stay focused on the rendered behavior rather than implementation details.

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 15, 2026
@JhaSourav07 JhaSourav07 merged commit bdf56ef into JhaSourav07:main Jun 15, 2026
10 of 11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @Nilamma19! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

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

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ShareButtons-empty-fallback): verify Edge Cases & Empty/Missing Inputs Verification (Variation 1)

3 participants