-
Notifications
You must be signed in to change notification settings - Fork 22
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
TestBench for unit testing: add typed "selectItem" #1842
Comments
Thanks for the issue, could you please provide an example code that you have in mind for this use case and where you expect another way of selecting an item? Just for us to understand what use case we need to optimise. |
Shure. Easy ;-) Usually ComboBoxes are populated by Enums (sometimes by Entities...)
Now for the UnitTest:
or
I would really preffer this, because UnitTesting is more whitebox-testing, so that would make more sense to me:
In addition Karibu allowed setting the value to the ComboBox as typed as above and not only Strings :-) |
Makes sense to me. Thanks! |
As of now, the ComboBoxTester as well as RadioButtonGroupTester have the method
"selectItem(String)"
I understand that this makes sence from "user point of view" and if you migrate vom Vaadin testBench (selenium based).
But UnitTests are more whitebox tests instead of the blacl box selenium basted tests.
To I recommend, that there should be a typed "selectItem" method, wich accepts the actual values of the ComboBoxes as an alternativ.
In addidtion the _setValue() vor ComboBoxes and RadioButtonGroups in Karibu (you base on) accept the typed values, too!
The CheckBoxTester should have a "setValue" in addition. A "click()" and hope that'll toggle correctly is not that helpful in whitebox tests...
I'd appreciate this extension I assume that it will be helpful for most developers.
The text was updated successfully, but these errors were encountered: