Skip to content

test(Dropdown): add regression coverage for Checkbox nested in Dropdown.Item/Header - #4541

Open
AmanUllah687 wants to merge 1 commit into
Semantic-Org:masterfrom
AmanUllah687:test/2121-checkbox-in-dropdown
Open

test(Dropdown): add regression coverage for Checkbox nested in Dropdown.Item/Header#4541
AmanUllah687 wants to merge 1 commit into
Semantic-Org:masterfrom
AmanUllah687:test/2121-checkbox-in-dropdown

Conversation

@AmanUllah687

Copy link
Copy Markdown

Closes #2121

What

Adds regression tests confirming that a Checkbox's onClick handler
fires correctly when nested inside a Dropdown.Item and inside a
Dropdown.Header.

Why

#2121 reports that onClick doesn't fire on a Checkbox nested inside
a Dropdown (as an item or a header). That issue is currently locked
with reason "resolved," so I wasn't able to comment there directly,
hence explaining here instead.

I couldn't reproduce the bug against current master or the published
2.1.5. I rendered a Checkbox inside both a Dropdown.Item and a
Dropdown.Header and simulated a real mousedown → mouseup → click
sequence; onClick fired correctly in both cases.

Digging through git history, Checkbox's click-handling logic was
rewritten for unrelated reasons in the fixes referenced inline as
#3351 and #3433, and that rewrite looks to have fixed this issue as a
side effect. No test ever verified it though, so this PR adds that
coverage and closes the loop on the original report.

Testing

  • Added two tests under describe('Checkbox child', ...) in
    Dropdown-test.js
  • yarn test passes locally (11033 tests completed, 0 failed)

Closes Semantic-Org#2121

Verified onClick fires correctly on a Checkbox nested inside
Dropdown.Item and Dropdown.Header against current master.
No source change needed, existing Checkbox click handling
already covers this.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@AmanUllah687 is attempting to deploy a commit to the Semantic UI Team on Vercel.

A member of the Team first needs to authorize it.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.53%. Comparing base (e0a42b5) to head (2a23e7c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4541   +/-   ##
=======================================
  Coverage   99.53%   99.53%           
=======================================
  Files         186      186           
  Lines        3463     3463           
=======================================
  Hits         3447     3447           
  Misses         16       16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox: onClick doesn't fire when inside a Dropdown

1 participant