Open coryhouse opened 2 years ago
Cypress.Commands.add("findSectionByHeading", (heading) => { return cy.findByRole("heading", { name: heading }).closest("section"); }); // This type is necessary for TypeScript declare global { namespace Cypress { interface Chainable { findSectionByHeading(heading: string): Chainable<Element>; } } }
Custom Commands