Teaching Capybara Testing - An Illustrated Adventure
summary
Shows how end-to-end specs actually look and run: config a Selenium Chrome driver with an env var to toggle headless, use binding.irb to interactively discover selectors, and write a registration/login spec plus a user-joins-group flow against a toy RailsConf 2023 app. Emphasizes accessibility first so tests use role→label→placeholder→text queries, demonstrates dealing with time zones and flaky UI, and reports that after a full restyle the critical flows still pass rather than breaking. App demo is illustrative not production ready.
AI-written summary · about
chapters (8)
- 0:00Capybara testing adventure
- 2:10Testing types and end-to-end
- 5:15First Capybara end-to-end test
- 13:46Testing user flows like registration
- 15:10Modeling data for group joining
- 18:06Writing expectations and flakiness
- 21:22Preventing brittle Capybara tests
- 28:23Summary and resources
related talks
49mFront End Testing Frontier
32mAmbitious Capybara
01h 19mBDD and Acceptance Testing with RSpec & Capybara
16mBlack Box Testing with RSpec and Capybara
29mMinitest with Capybara: Tips, Tricks and Lessons Learned
44mSelenium and Cucumber
32mAll about web application testing
21mWriting Declarative, Maintainable Integration Tests Using Page Objects
