Testing user-visible behavior makes tests less brittle. CSS class names often describe implementation rather than user behavior.