component.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // ***********************************************************
  2. // This example support/component.ts is processed and
  3. // loaded automatically before your test files.
  4. //
  5. // This is a great place to put global configuration and
  6. // behavior that modifies Cypress.
  7. //
  8. // You can change the location of this file or turn off
  9. // automatically serving support files with the
  10. // 'supportFile' configuration option.
  11. //
  12. // You can read more here:
  13. // https://on.cypress.io/configuration
  14. // ***********************************************************
  15. // Import commands.js using ES2015 syntax:
  16. import './commands'
  17. // Alternatively you can use CommonJS syntax:
  18. // require('./commands')
  19. import { mount } from 'cypress/angular'
  20. // Augment the Cypress namespace to include type definitions for
  21. // your custom command.
  22. // Alternatively, can be defined in cypress/support/component.d.ts
  23. // with a <reference path="./component" /> at the top of your spec.
  24. declare global {
  25. namespace Cypress {
  26. interface Chainable {
  27. mount: typeof mount
  28. }
  29. }
  30. }
  31. Cypress.Commands.add('mount', mount)
  32. // Example use:
  33. // cy.mount(MyComponent)