Select2 testing with PhantomJS

537 views
Skip to first unread message

Jesper Rønn-Jensen

unread,
Sep 28, 2012, 5:19:03 AM9/28/12
to sel...@googlegroups.com
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

 

jarno.ke...@gmail.com

unread,
Jul 6, 2013, 2:55:47 PM7/6/13
to sel...@googlegroups.com
On Friday, September 28, 2012 12:19:03 PM UTC+3, Jesper Rønn-Jensen wrote:
>
> Now, our test setup is to run
>
>
> Cucumber => Capybara => Poltergeist => Phantomjs 

Did you find any solution?

We have exactly the same setup and Select2 iframe magic seems to kill Poltergeist/Phantomjs :/

dzm...@gmail.com

unread,
Sep 13, 2018, 7:15:02 PM9/13/18
to select2
If this is still actual:

I revived capybara-select2 gem https://github.com/goodwill/capybara-select2 which is not longer maintained. See https://github.com/Hirurg103/capybara_select2

Reply all
Reply to author
Forward
0 new messages