Uploaded October 2024 | Updated September 2026, 1 week ago
This is a video from a free lesson in my online course teaching test-driven development using Cypress where I code a small web calculator https://cypress.tips/courses/tdd-calculator In this lesson, we replace the orange operator button backgrounds with an image of a pumpkin. We confirm the image is downloaded by the browser, it is applied via the CSS property "background-image" plus the button becomes larger when the user hovers over it. Check out the full course if you want to see more lessons or do the hands-on exercises. Until Nov 11th, 2024 you can use the promo code TDDHALLOWEEN to get 25% off this course.
This is a video from a free lesson in my online course teaching test-driven development using Cypress where I code a small web calculator https://cypress.tips/courses/tdd-calculator In this lesson, we replace the orange operator button backgrounds with an image of a pumpkin. We confirm the image is downloaded by the browser, it is applied via the CSS property "background-image" plus the button becomes larger when the user hovers over it. Check out the full course if you want to see more lessons or do the hands-on exercises. Until Nov 11th, 2024 you can use the promo code TDDHALLOWEEN to get 25% off this course.





![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)




