test(Dropdown): add regression coverage for Checkbox nested in Dropdown.Item/Header - #4541
Open
AmanUllah687 wants to merge 1 commit into
Open
Conversation
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.
|
@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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2121
What
Adds regression tests confirming that a
Checkbox'sonClickhandlerfires correctly when nested inside a
Dropdown.Itemand inside aDropdown.Header.Why
#2121 reports that
onClickdoesn't fire on a Checkbox nested insidea 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
masteror the published2.1.5. I rendered a Checkbox inside both a Dropdown.Item and aDropdown.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
describe('Checkbox child', ...)inDropdown-test.jsyarn testpasses locally (11033 tests completed, 0 failed)