11/// <reference types="cypress" />
2-
3- import { mount } from "cypress-ct-qwik" ;
4-
52// ***********************************************
63// This example commands.ts shows you how to
74// create various custom commands and overwrite
@@ -11,30 +8,30 @@ import { mount } from "cypress-ct-qwik";
118// commands please read more here:
129// https://on.cypress.io/custom-commands
1310// ***********************************************
14-
15- // eslint-disable-next-line @typescript-eslint/no-namespace
16- declare namespace Cypress {
17- // eslint-disable-next-line @typescript-eslint/no-unused-vars
18- interface Chainable < Subject > {
19- login ( email : string , password : string ) : void ;
20- mount : typeof mount
21- }
22- }
11+ //
2312//
2413// -- This is a parent command --
25- Cypress . Commands . add ( 'login' , ( email , password ) => {
26- console . log ( 'Custom command example: Login' , email , password ) ;
27- } ) ;
28-
29- Cypress . Commands . add ( 'mount' , mount )
14+ // Cypress.Commands.add('login', (email, password) => { ... })
15+ //
3016//
3117// -- This is a child command --
32- // Cypress.Commands.add(" drag" , { prevSubject: 'element'}, (subject, options) => { ... })
18+ // Cypress.Commands.add(' drag' , { prevSubject: 'element'}, (subject, options) => { ... })
3319//
3420//
3521// -- This is a dual command --
36- // Cypress.Commands.add(" dismiss" , { prevSubject: 'optional'}, (subject, options) => { ... })
22+ // Cypress.Commands.add(' dismiss' , { prevSubject: 'optional'}, (subject, options) => { ... })
3723//
3824//
3925// -- This will overwrite an existing command --
40- // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
26+ // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
27+ //
28+ // declare global {
29+ // namespace Cypress {
30+ // interface Chainable {
31+ // login(email: string, password: string): Chainable<void>
32+ // drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
33+ // dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
34+ // visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
35+ // }
36+ // }
37+ // }
0 commit comments