~/talk

Stop Talking to Strangers: Applying the Law of Demeter to Cypress Tests

Talkat CypressConf 2026 · 2026-10-20..10-22· [testing]
slides:none on file

Argues that deep DOM selectors cause fragile Cypress tests and applies the Law of Demeter: tests should only touch immediate contracts, not internal nodes. Builds a small React login app, uses cy.intercept to stub auth and a custom command cy.getByPrompt that calls Cypress AI to locate elements by behavior. Changes the button’s data-test-id and class during the demo; the test shows a self healed tag and still passes, proving the approach works.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 1:25Fragile tests from deep DOM navigation
  3. 6:50Law of Demeter explained
  4. 9:04Applying Demeter to test design
  5. 13:25Cypress AI-powered locators
  6. 17:11Live demo of custom command
  7. 24:30Key takeaways and conclusion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.