Keeping Tests Healthy
with DOM Distancing

The Chunkiz

Keeping Tests Healthy
with DOM Distancing

The End

or Letโ€™s get Future Proof

๐Ÿš€ ย  ย  ย  ๐Ÿ’ช

or Letโ€™s get Future Proof

๐Ÿš€ ย  ย  ย  ๐Ÿ’ช

Which Abstraction?

A Page is a tree of Reusable Components

If a Page is a tree of Reusable Components,

then a Page Object should be a tree of ???

If a Page is a tree of Reusable Components,

then a Page Object should be a tree of Gloves

๐Ÿงค

A Glove is an abstraction allowing tests to interact with components while keeping them clean of implementation details

๐Ÿงค

DEMO

Keep Your Tests Healthy with DOM Distancing

By Younes

Keep Your Tests Healthy with DOM Distancing

Modern tooling is making testing easier than ever but in our testing frenzy, we might forget to keep the right distance between tests and implementation details like the DOM. Letโ€™s browse different techniques ranging from DOM attributes, Page Objects, and Gloves to Test Harnesses and see how the same abstraction can be reused in different tools like Jest or Cypress | ๐Ÿ“ฆ tools: https://github.com/jscutlery/test-utils | ๐Ÿ“š video: https://youtu.be/ZKBHWcjFufw | ๐Ÿ’ป code: https://github.com/marmicode/whiskmate

  • 937