Closed ChrisCPO closed 6 years ago
That URL is a 404 for me; is music_app
a private repository?
Can you paste the test, the JavaScript it's testing, and the failure? Screenshots may also be helpful.
If you enable debug mode, you can see more details about what capybara-webkit is doing, which may identify the issue.
I'm going to close this issue, as I don't have enough information to identify a potential bug, but feel free to continue commenting and asking questions.
Most likely this is because you're using more modern JS features than QtWebkit supports (ES5)
@jferris I have made it public. I can get you some screen shots
This is the results of a form that does uses ajax and jquery. it is simply submitting the form, as normal. rendering the rendered partial in response.
@ChrisCPO As I guessed, you're using ES6 feature 'let' - https://github.com/ChrisCPO/music_app/blob/develop/app/assets/javascripts/search.js#L2 - and maybe others (I stopped looking when I saw let
in the 2nd line) which is not supported by any currently released version of QtWebkit (which capybara-webkit compiles against). You either need to stick to maximum ES5 features, or transpile (babel, etc) your JS during asset compilation to be ES5 compatible. If you enabled debug mode (as suggested by @jferris) or set raise_javascript_errors
in the driver config - https://github.com/thoughtbot/capybara-webkit#configuration - it should have been immediately clear what the issue was.
@twalpole Ahh thanks for your help.
I have a rails 5.1 .4, that I created with suspenders 1.45
I have an app with some failing(well pending tests) (brach)[https://github.com/ChrisCPO/music_app/tree/develop]
see spec/features/search_spec.rb if you look at the screen shots produced they Ajax /Jquery is not working.