Uploaded March 2025 | Updated November 2026, 8 minutes ago
This video shows an E2E Cypress test that confirms that TanStack router does not request the data update if the data has been fetched within its "staleTime" parameter. The test also confirms that if the data is older than the "staleTime" parameter, TanStack makes a network call to refresh it. Tip: we use cy.clock and cy.tick commands to fast forward the application clock to make the test run within 1 second. Find the test at github.com/bahmutov/my-router-app and more Cypress network testing examples in my course https://cypress.tips/courses/network-testing
This video shows an E2E Cypress test that confirms that TanStack router does not request the data update if the data has been fetched within its "staleTime" parameter. The test also confirms that if the data is older than the "staleTime" parameter, TanStack makes a network call to refresh it. Tip: we use cy.clock and cy.tick commands to fast forward the application clock to make the test run within 1 second. Find the test at github.com/bahmutov/my-router-app and more Cypress network testing examples in my course https://cypress.tips/courses/network-testing


![Find Elements Without An Attribute
This video shows how to find all the elements that do not have a specific attribute. For example, lets find all buttons that dont have attribute data-cy
cy.get(button:not([data-cy]))
Find the recipe at https://glebbahmutov.com/cypress-examples Find Elements Without An Attribute](https://i.ytimg.com/vi/52KW-t2wWaE/mqdefault.jpg)




![Check N Checkboxes
This video shows how to check multiple checkboxes and how to validate the number of checked and clear boxes in your Cypress tests
// there are no checked boxes at first
cy.get(input[type=checkbox]:checked).should(have.length, 0)
const n = Cypress._.random(1, 5)
cy.log(`checking the first ${n} boxes`)
for (let k = 0; k less than n; k += 1) {
cy.get(input[type=checkbox]).eq(k).check()
}
cy.get(input[type=checkbox]:checked).should(have.length, n)
// clear boxes
cy.get(input[type=checkbox]:not(:checked)).should(
have.length,
5 - n,
)
Find this recipe at https://glebbahmutov.com/cypress-examples Check N Checkboxes](https://i.ytimg.com/vi/6vw47x6Nqc0/mqdefault.jpg)


