Created a test to see if the initial value is set on render. Did this using a check to see if the selected value is initially present or not. Couldn't use value since antd renders Select as input with combobox and doesn't update the value
Created a test to see if the value changes when the user clicks on a different option. Since fireEvent.change does not seem to work, I used mouseDown to first open the select and then click to select an option. antd renders the options as span so I was not able to use option.selected. Furthermore I used the check of toBeGreaterThan since I couldnt find a way to close the dropdown.
@jannikbuschke lmk what if you have any feedback or changes to be made
Referenced these links while coming up with the third test:
fireEvent.change
does not seem to work, I usedmouseDown
to first open the select and thenclick
to select an option. antd renders the options asspan
so I was not able to useoption.selected
. Furthermore I used the check oftoBeGreaterThan
since I couldnt find a way to close the dropdown.@jannikbuschke lmk what if you have any feedback or changes to be made
Referenced these links while coming up with the third test: