https://cypress.io logo
Page Objects, store locators for easy reuse withou...
# best-practices
p
Page Objects, store locators for easy reuse without having to type locator strings over and over (and over), and page-specific helpers such as
waitForPage
function which would wait for specific API calls to complete using
cy.intercept()
and/or specific UI elements to be visible before allowing the test steps to proceed. Reduces flaky tests to nearly 0. Have seen other users suggest simply setting the default timeout to 60 seconds which I suppose would work, but would mask sloppy test design, and make actual failures take 60 seconds to report. Educate me. 😃
2 Views