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 timeout and backward compatibility issues #52

Closed Hirurg103 closed 1 month ago

Hirurg103 commented 8 years ago

@divineforest could you please review this work. Thanks

Hirurg103 commented 8 years ago

@goodwill what do you think about these changes?

Hirurg103 commented 7 years ago

Guys, is somebody responsible for this project?

p-salido commented 6 years ago

I also encountered slow selects - those users who run an older version of select2 will be affected, those who run the current version (4.0?) will not be.

The patch in this PR was intermittently failing at the finds for me, hence I adopted a slightly different approach. I cut out all select2 4.0 code and just left the old-version code (https://github.com/p-salido/capybara-select2/commit/4cdb9684cbefd064406cafba54634fadb1f9cd57).

This was passing in chrome but failing in poltergeist, due to what seemed like select2 being clicked before it was actually a select2 control. Hence I added https://github.com/p-salido/capybara-select2/commit/ed02fcf37ae95d4a308f78049f4c4d8c71777363 to retry the click and delay the first click a bit and this so far seems to be working on both chrome and poltergeist.

Hirurg103 commented 6 years ago

@p-salido I released a rework of this gem and tried to fix all the compatibility and performance issues