~/talk

Writing Declarative, Maintainable Integration Tests Using Page Objects

Talkat WindyCityRails 2016 · 2016-09-15..09-16· [testing, frontend-architecture]
links:none on file
slides:none on file

Argues that page objects make RSpec + Capybara integration tests declarative, DRY and far less brittle, and demonstrates by building page objects for product → cart → checkout flows against Amazon-style pages so tests read like high-level steps rather than CSS fiddling. Shows red/green/refactor cycle working, extracts reusable component objects, and ships a 30-line error helper that makes Capybara failures show useful diffs. Uses plain Ruby classes including Capybara DSL, keeps assertions in specs, and reports the helper is tiny, practical and effective.

AI-written summary · about

  1. 0:00Intro
  2. 1:04Goals
  3. 1:36Integration Tests
  4. 2:09Problems with Integration Tests
  5. 3:19The Tools
  6. 3:38Natural Language
  7. 4:42Integration Testing
  8. 5:23TDD Cycle
  9. 6:14Example
  10. 6:39Page Objects
  11. 7:59Why Use Page Objects
  12. 8:22How to Write Page Objects
  13. 10:14Example Application
  14. 14:07Running the Test
  15. 14:44Implementing the Test
  16. 15:56Reusable Page Objects
  17. 16:26Error Messages
  18. 17:51Feedback
  19. 18:04Best Practices
  20. 18:24Predicate Methods
  21. 18:45User Language
  22. 19:08One Page
  23. 19:31Notable Libraries
  24. 19:53Conclusion
  25. 20:09Refactor Integration Tests
~/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.