You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem. Three things a user does with a ComboBox have no tester
representation.
No clear().ComboBox implements HasClearButton, and emptying a field
is always available to the user (#168). ComboBoxTester.selectItem(null) is the
only route, which reads as "select nothing" rather than "the user cleared it",
and MultiSelectComboBoxTester has no equivalent at all.
No custom value entry.setAllowCustomValue(true) + addCustomValueSetListener is a core ComboBox feature — the user types
something that isn't in the list and the app decides what to do with it. There
is no way to fire CustomValueSetEvent, so that whole branch of application
code is untestable.
comboBox.setAllowCustomValue(true);
comboBox.addCustomValueSetListener(e -> items.add(e.getDetail()));
// no tester method reaches this
MultiSelect replaces instead of toggles. MultiSelectComboBoxTester.selectItem(String...) overwrites the whole
selection, so selecting a second item silently drops the first — but in the
browser each click toggles one chip. There is also no deselectItem, and no way
to remove a single chip via its ✕. MultiSelectListBoxTester gets this right: selectItems adds to the existing selection and deselectItems removes.
Problem. Three things a user does with a ComboBox have no tester
representation.
No
clear().ComboBoximplementsHasClearButton, and emptying a fieldis always available to the user (#168).
ComboBoxTester.selectItem(null)is theonly route, which reads as "select nothing" rather than "the user cleared it",
and
MultiSelectComboBoxTesterhas no equivalent at all.No custom value entry.
setAllowCustomValue(true)+addCustomValueSetListeneris a core ComboBox feature — the user typessomething that isn't in the list and the app decides what to do with it. There
is no way to fire
CustomValueSetEvent, so that whole branch of applicationcode is untestable.
MultiSelect replaces instead of toggles.
MultiSelectComboBoxTester.selectItem(String...)overwrites the wholeselection, so selecting a second item silently drops the first — but in the
browser each click toggles one chip. There is also no
deselectItem, and no wayto remove a single chip via its ✕.
MultiSelectListBoxTestergets this right:selectItemsadds to the existing selection anddeselectItemsremoves.Ask.
clear()on both combo box testers, consistent with feat: give every value tester a uniform clear() #168.setCustomValue(String)(or similar) firingCustomValueSetEventwithisFromClient() == true, throwing whenisAllowCustomValue()is false.MultiSelectComboBoxTester.selectItemadditive and adddeselectItem/deselectAll, matchingMultiSelectListBoxTester.The last one is a behavioural change and wants a release note.
Found while auditing the project against #153 / #168.