I am currently creating a test suite to test pages which include the marvelous Select2 dropdown. I use Select2 both with ajax calls to search through a 65,000 item list and also use it as direct replacement for a dropdown (with 100 options).
Now, our test setup is to run
Cucumber => Capybara => Poltergeist => Phantomjs
This way we have our browser testing to run headlessly and extremely fast.
Only thing is I cannot figure out how to test the typeahead functionality.
My interest is not as much in unit testing the select2 component itself.
But I am very interested in testing my application which now depends on select2.
I want a way in my testing setup where I can verify that Select2 and my app integrates and works as I expect.
I would appreciate any information you could share in this subject:
Any thoughts on how to automate testing of autocomplete features, thoughts, suggestions. And of course actual code in case you already succeeded in setting something similar up.
Thanks a lot for your time!
/Jesper Rønn-Jensen