goodwill / capybara-select2

Helper for capybara to be able to trigger select on select2 javascript (needed for js enabled test only)
MIT License
80 stars 111 forks source link

Fix the issue #17 #18

Open GCorbel opened 11 years ago

GCorbel commented 11 years ago

It works for me

chalmagean commented 11 years ago

it should probably be find(:css, drop_container).find(:css, ".select2-result-label").click since the span is used to match the searched text

GCorbel commented 11 years ago

Both are working.

I made a benchmark and this is the result :

select2-result-label  1.150000   0.510000   1.660000 (  3.041824)
select2-match  1.050000   0.440000   1.490000 (  2.712075)

So, for speed, it's better to use "select2-match". Do you see another reason than speed?

chalmagean commented 11 years ago

select2-match is empty, unless you do a search

GCorbel commented 11 years ago

I did the changes.