I have a cucumber script with a tag @javascriptand I am testing it with some really basic js built-in calls. I run this with
Capybara.javascript_driver =: webkit
If I do this on the page, after this element has id = "ajax_test_results", don't worry about ajax, though, for now)
document.getElementById('ajax_test_results').innerHTML = 'Replaced with basic js, ie not jquery, without waiting for pageLoad';
then it works: if I crossed out the page in my test, I see that js started and updated the content. However, if I try to do the same with jquery
jQuery("#ajax_test_results").html("updated with basic jquery dom manipulation, without waiting for document.ready");
then it will not work. I think jquery is not loading, but I do not know how to debug it.
Any ideas? I saw this post that looked reliable https://stackoverflow.com/questions/8428405/cucumber-tests-jquery-does-not-loaded-in-webdriver , but config.assets.debug = truecauses an error for me - I think it’s only rails 3 Are there rails of 2 equivalents? or some other solution?
Grateful for any advice - max
source
share