openMenu(item: 'Customers' | 'Holidays'): void; testid(selector: string): Chainable<JQuery<HTMLElement>>; } } Cypress.Commands.add('openMenu', (item: 'Customers' | 'Holidays') => { cy.findByRole('link', { name: item }).click(); }); Cypress.Commands.addQuery('testid', (selector: string) => { const getFn = cy.now('get', `[data-testid=${selector}]`) as () => Promise<Chainable<JQuery>>; return () => getFn(); });