Front-end Testing for Skeptics
summary
Claims that pure Ruby tests can drive real JavaScript UI, run headless, and stay fast and reliable are demonstrated end to end: a third‑party autocomplete widget deployed hundreds of thousands of times a day gets refactored for mobile and guarded by integration tests that fail on JS errors, catch global leaks, exercise XSS cases, and reproduce flaky failures with a web inspector. Tests use phantomjs with poltergeist and a Capybara‑style DSL, show a working example app, and note occasional phantomjs crashes and DB transaction gotchas.
AI-written summary · about
chapters (5)
- 0:00Start
- 3:24"JavaScript now works." -Paul Graham, defining Ajax
- 4:05swiftype
- 10:17Capybara.register_driver poltergeist do app Capybara::Poltergeist::Driver.new app
- 27:25Transactions and database setup Some Capybara drivers need to run against an actual HTTP server. Capybara takes care of this and starts one for you in the same process as your test, but on another thread. Selenium is one of those drivers, whereas Rack Test is not.
related talks
49mFront End Testing Frontier
32mMake backend devs jealous of your test suite
14mDebugging Secrets of a Lazy Developer
36mModern Web Testing: Going Beyond Selenium
01h 02mWriting better tests for your JavaScript app
26mModern Testing Practices in Frontend Applications
09mElemental Testing My Dear Watson - Unit Tests for UI Components
39mTesting, Testing, 1, 2, NaN
