SuggestionList { trigger: '#', values: ['hello', 'world'] };
- Should show both the values on typing
# - Should show only "hello" value on typing
h - Should ignore case, should show "hello" on typing
H - Should show dropdown on selecting multiple characters, type
heand select both the characters - Should not show dropdown when the next character after the cursor belongs to [a-zA-Z0-9_], type
heand move the cursor betweenhande - Above rule should be applied when selecting multiple characters too, type
heland selecthe - When dropdown is being shown,
enterortabkey should replace the "trigger + keyword" with the value of suggestion highlighted. - The inserted value should not contain
#as it is not part of the value - If the input being edited is scrolled in any direction, position of the dropdown should still work normally
- All the above test cases should pass for all three types of input fields input, textares and contenteditable
- Vertical position of the dropdown sholuld be right below the keyword except for input where it will be right below the input box.
- All of the above conditions should hold if trigger character is changed to
## - When dropdown is being shown,
upanddownarrow keys should update the highlighted value in the dropdown.up => prev || last down => next || first - When dropdown is being shown,
esckey should close the dropdown. - When dropdown is being shown,
up,down,enter,tabandesckeys should not implement their default behavior
... to be continued