~/talk

Front-end Testing for Skeptics

Talkat RailsConf 2013 · 2013-04-29..05-02· [testing, frontend-architecture]
slides:none on file

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

  1. 0:00Start
  2. 3:24"JavaScript now works." -Paul Graham, defining Ajax
  3. 4:05swiftype
  4. 10:17Capybara.register_driver poltergeist do app Capybara::Poltergeist::Driver.new app
  5. 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.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.