Skip to content

Instantly share code, notes, and snippets.

@JaredRoth
Forked from rrgayhart/1602-testing-homework.markdown
Last active July 5, 2016 09:24
Show Gist options
  • Select an option

  • Save JaredRoth/3fb15d4fc3caaa3582c0563b00e54604 to your computer and use it in GitHub Desktop.

Select an option

Save JaredRoth/3fb15d4fc3caaa3582c0563b00e54604 to your computer and use it in GitHub Desktop.
Testing Homework

Testing Homework - Rails/JS

My experience implementing / Was I successful?

I initially spent far too many hours struggling against Selenium while trying to test Stripe for my personal project in Mod 3, putting me at a bit of an advantage for implementing JS feature tests at this point. I learned a lot from a lot of mistakes, but also had set up the entire environment and worked out the bugs, so re-implementing Selenium-based feature tests for idea box was pretty simple.

Some mistakes:
  • Firefox version incompatible with Selenium (...but didn't realize until I got to the bottom of this list and worked my way back up it)
  • Chrome is stupidly complicated to set up with Selenium
  • Unable to use any headless driver to test Stripe (it's very picky)
  • Capybara doesn't care about CSS conventions like an ID with a leading digit but capybara-webkit does. (Surprise, I had some and didn't understand why it broke things) After trying all these things from the top down, I ended up going back from the bottom up until I got Selenium working properly. All these compounding and unrelated variables made it rather difficult.

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

One large feature test complete with sad paths

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