Uploaded January 2025 | Updated September 2026, 1 week ago
This video shows how I create page objects for my Cypress end-to-end tests:
- wait for at least a few tests to be finished and working
- find common functionality on the page: visiting and waiting for the page to load, data reset, adding new items
- create page object methods (I use simply static objects)
- think about what the page method returns. Typically void, but some methods can return Cypress chain command so we can add additional commands and assertions
Find the full source code in the pull request github.com/bahmutov/todomvc-callback-example/pull/1
This video shows how I create page objects for my Cypress end-to-end tests:
- wait for at least a few tests to be finished and working
- find common functionality on the page: visiting and waiting for the page to load, data reset, adding new items
- create page object methods (I use simply static objects)
- think about what the page method returns. Typically void, but some methods can return Cypress chain command so we can add additional commands and assertions
Find the full source code in the pull request github.com/bahmutov/todomvc-callback-example/pull/1
![Chai Nested Property Assertion In Cypress
This video shows a lesser known Chai assertion have.nested.property The assertion works very well with objects and arrays:
cy.wrap({ name: { first: Joe } })
.should(have.nested.property, name.first, Joe)
// array example
cy.wrap([
{ sum: 42 },
{ sum: 101 },
{ sum: { errors: [Invalid operation] } },
]).should(
have.nested.property,
2.sum.errors.0,
Invalid operation,
)
The code examples are at https://glebbahmutov.com/cypress-examples/recipes/lesser-known-chai-assertions.html Chai Nested Property Assertion In Cypress](https://i.ytimg.com/vi/R1u73hgA1_Q/mqdefault.jpg)









