commands.js 870 B

123456789101112131415161718192021222324252627
  1. // cypress/support/commands.js
  2. // ***********************************************
  3. // This example commands.js shows you how to
  4. // create various custom commands and overwrite
  5. // existing commands.
  6. //
  7. // For more comprehensive examples of custom
  8. // commands please read more here:
  9. // https://on.cypress.io/custom-commands
  10. // ***********************************************
  11. //
  12. //
  13. // -- This is a parent command --
  14. // Cypress.Commands.add('login', (email, password) => { ... })
  15. //
  16. //
  17. // -- This is a child command --
  18. // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
  19. //
  20. //
  21. // -- This is a dual command --
  22. // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
  23. //
  24. //
  25. // -- This will overwrite an existing command --
  26. // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })