We currently define a jQuery UI slider with:
/ Search implementation
$("input#price-range").slider({
from:1,
to:200,
step:5,
round:0,
scale:[1, '|', 50, '|', 100, '|', 150, '|', 200],
dimension:"$",
skin:"round",
callback: do_search
});
What I am trying to do is test that the effects of the moving the slider and the results of the callback function. Live, the code works but testing it with Capybara/Cucumber has proven to be difficult.
I have tried
page.execute_script("$('#price-range').slider('value',#{price});")
to set a value but the callbacks don't seem to be called this way. Any idea how I could set the value and get the callbacks to fire in my cucumber test?