Back to articles
How-ToTools

Signals Are Not Guarantees - the mismatch between what e2e tests say and what they actually check

via Reddit Programming/u/TranslatorRude4917

A month ago I open-sourced a Playwright helper library. It was alive for about two weeks and downloaded 300 times - all of them by me 😅 The r/Playwright community was fair: the framework was too much. I spent a few weeks thinking about what actually mattered, what I was really trying to express. It distilled down to one idea, a small helper, and this post. tldr: Most e2e tests encode the current UI representation of behavior, not behavior itself. They check signals (visibility, text content, enabled states) instead of the facts the test is actually promising to protect. I think there's a useful distinction between signals, state, and promises that makes tests quieter and more resilient. If you're interested, give it a read, I'd appreciate it. If not, maybe let me know what I could do better! Appreciate any feedback, and happy to partake in discussions :) I'll drop the gist for the helper in a comment. submitted by /u/TranslatorRude4917 [link] [comments]

Continue reading on Reddit Programming

Opens in a new tab

Read Full Article
3 views

Related Articles