testing.js.erb
80 Bytes
-
jQuery animations make acceptance tests unreliable due to the way PhantomJS, Poltergeist and Capybara interact. To click on an element, Capybara finds it's position in the screen, then literally clicks at the element's x and y coordinates. This works fine if the element does not move, but if the element is being shown by an animation, it will move, and the click will miss. This caused some tests, like the one for Ruby metric configuration creation, to fail sporadically. Using jQuery's mechanism for globally disabling animations only during tests seems to fix the unreliability (20 out of 20 runs of the Ruby metric conf. test succeded). Signed-off-by: Daniel Miranda <danielkza2@gmail.com>