Skip to content

Instantly share code, notes, and snippets.

@patrickwhardy
Last active June 30, 2016 22:40
Show Gist options
  • Save patrickwhardy/05e5444f5ff97f20085e3334eed825b0 to your computer and use it in GitHub Desktop.
Save patrickwhardy/05e5444f5ff97f20085e3334eed825b0 to your computer and use it in GitHub Desktop.
Rails/JS Testing

###Your experience implementing

  • I implemented Selenium in ideabox and it went much smoother than the last time I tried to do this. This doesn't mean that the setup is not quite cumbersome - it is. So many layers of dependence: selenium depends on firefox to run, it depends on capybara's driver to be set to selenium, it depends on wait for ajax methods to be set up properly, it depends on js: true being set, it depends on database cleaner to be specially configured and then it sometimes wont even properly trigger events as it should. What a pain!

###Were you successful?

  • I did atleast have some success. Ajax was executed and the responses properly executed and vereified in the test. The only reason I didn't get every javascript feature tested was because I ran into issues with SQLite3 - at this point I had been struggling with sqlite for a long time and was very unmotivated to fix it.

###Links to commits on Github or copy and pasted code snippits of a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment