// type definition for all custom commands declare namespace Cypress { // eslint-disable-next-line @typescript-eslint/no-unused-vars interface Chainable { /** * Custom command to select DOM element by data-test attribute. * * @example cy.getBySel('greeting') */ getBySel(value: string): Chainable>; /** * Custom command to work around the fact that cy.clear sometimes fails at clearing the * Console's textarea * @example cy.get('textarea').clearConsoleTextarea() */ clearConsoleTextarea(): Chainable>; /** * Visit the initial empty page. * Console's textarea * @example cy.visitEmptyPage() */ visitEmptyPage(): Chainable; /** * Success notifications */ expectSuccessNotification(): Chainable; expectSuccessNotificationWithTitle(title: string): Chainable; expectSuccessNotificationWithMessage(message: string): Chainable; /** * Error notifications */ expectErrorNotification(): Chainable; expectErrorNotificationWithTitle(title: string): Chainable; expectErrorNotificationWithMessage(message: string): Chainable; /** * Start intercepting the request/response contract between the Console and the server. * @example * cy.startContractIntercept( * { * thisTest: this.test, * mode: 'record', * createFixtureName: (req: CyHttpMessages.IncomingHttpRequest) => { * if (req.url.endsWith('v1/metadata')) { * return `v1-metadata-${req.body.type}`; * } * * throw new Error(`Unknown url ${req.url}`); * }, * }, * 'http://localhost:8080/**' * ); */ startContractIntercept( startContractInterceptOptions: import('./contractIntercept/types').StartContractInterceptOptions, url: string ): Chainable; /** * Halt intercepting the request/response contract between the Console and the server and save the fixtures. * @example * cy.haltContractIntercept({ thisTest: this.test }) */ haltContractIntercept(options: { thisTest: Mocha.Context; saveFixtureFiles?: boolean; }): Chainable; } }