Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure setChecked() and setSelected() only trigger DOM events when state is changed (fix #1339) #1380

Merged
merged 8 commits into from
Jan 3, 2020

Conversation

vvanpo
Copy link
Contributor

@vvanpo vvanpo commented Dec 19, 2019

Wrapper.setChecked() and Wrapper.setSelected() should not trigger DOM events when called on already checked or selected elements.

Closes #1339

Copy link
Member

@afontcu afontcu left a comment

Choose a reason for hiding this comment

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

Looks good! I've added some comments related to test titles, to keep them consistent with previous ones :)

Thank you for this! 🙌

test/specs/wrapper/setChecked.spec.js Outdated Show resolved Hide resolved
test/specs/wrapper/setChecked.spec.js Outdated Show resolved Hide resolved
test/specs/wrapper/setChecked.spec.js Outdated Show resolved Hide resolved
test/specs/wrapper/setChecked.spec.js Outdated Show resolved Hide resolved
test/specs/wrapper/setSelected.spec.js Outdated Show resolved Hide resolved
test/specs/wrapper/setSelected.spec.js Outdated Show resolved Hide resolved
Copy link
Member

@afontcu afontcu left a comment

Choose a reason for hiding this comment

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

This looks good to me! 👍

Pinging @dobromir-hristov and @JessicaSachs as they shared their thoughts on the issue :)

Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

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

Just a minor comment :)

packages/test-utils/src/wrapper.js Show resolved Hide resolved
@lmiller1990 lmiller1990 self-requested a review January 3, 2020 06:55
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Has an approve and all tests passing, let's merge this up. Nice job!!

@lmiller1990 lmiller1990 merged commit 916b07f into vuejs:dev Jan 3, 2020
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.

wrapper.setSelected() triggers a change event even if the option is already selected
4 participants