-
Notifications
You must be signed in to change notification settings - Fork 567
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
setSelected method should check value after .click() action #520 #594
setSelected method should check value after .click() action #520 #594
Conversation
Well, guys with modern UI frameworks it's all useless! |
Codecov Report
@@ Coverage Diff @@
## master #594 +/- ##
============================================
+ Coverage 60.43% 60.48% +0.05%
+ Complexity 770 734 -36
============================================
Files 148 134 -14
Lines 2750 2660 -90
Branches 270 273 +3
============================================
- Hits 1662 1609 -53
+ Misses 982 945 -37
Partials 106 106
Continue to review full report at Codecov.
|
@SergeyPirogov did you mean that this pull request will never be reviewed/merged ? |
@jane-ryabchenko Not exactly :) But yes, it's true: I am in doubt. I am afraid that this change will make things slower, but will not always solve the problem. I don't claim that your PR is definitely wrong, I am just in doubt. Anyway, let's start with a simple question:
|
@asolntsev Required change described in #520 doesn't makes much sense to me. For example, if I call checkbox.setSelected(true) I expect that checkbox.isSelected() will return true after the call. But actual code in setSelected method does not checks the state of the element to determine if it's already selected and shouldn't be clicked. Definitely I don't want to be in a situation when checkbox is already selected and call checkbox.setSelected(true) sets selection to false. |
…selection-command
@jane-ryabchenko, @asolntsev, @BorisOsipov I my point of view this case mix functionality with verification.
@jane-ryabchenko Just note for you you shouldn't commit |
First, I don't understand what changes are proposed to this PR - diff is so big and full of garbage. I guess it makes sense to create a new PR with corresponding commits. Second, I agree with @SergeyPirogov "Well, guys with modern UI frameworks it's all useless!" - it is the sad truth. In modern UI frameworks you hardly ever deal with standard html select. |
Close it for now, if really needed submit a new PR cleared from not necessary files. |
Added SetSelected.isSelectable and SetSelected.isDeselectable methods.
If user tries to select not selectable element InvalidStateException will be thrown.
If user tries to de-select radio or option element InvalidStateException will be thrown.
Added Unit and Integration tests to cover every case.