vaadin / form-filler-addon

Other
4 stars 0 forks source link

fix: filling values for ComboBoxes and MultiSelectComboboxes. #128

Closed czp13 closed 1 year ago

czp13 commented 1 year ago

Description

Based on slack discussions (Leif's suggestions): values can only be AI-filled into ComboBoxes and MultiSelectComboBoxes, if:

Fixes # (issue)

Type of change

Checklist

Additional for Feature type of change

czp13 commented 1 year ago

It was tested with the following cases:

  1. allowedCustomValue false: 1.A English (values also existing in item List) the values were filled 1.B Hungarian not filled the ComboBox or MultiSelectCombobox (picture below):
image
  1. allowedCustomValue true: 2.A and 2.B in both cases the values were always filled in the ComboBox and MultiSelectCombobox (picture below):
image
czp13 commented 1 year ago

Added covering tests and fixed other review comments too. Thank you for your suggestions once more @mshabarov! 🙇

Unfortunately, parameterized tests are not supported in Junit4 (in Junit5 it will be), and I did not want to add another dependency just for this, so the tests are ugly because of it.

With Parameterized tests, it would have been a fraction of the code and cleaner as well :( Anyway, I added most use cases I could think of for Comboboxes and MultiSelectComboboxes.