index.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import '@testing-library/cypress/add-commands'
  2. import {
  3. interceptCompile,
  4. waitForCompile,
  5. interceptDeferredCompile,
  6. } from './compile'
  7. import { interceptEvents } from './events'
  8. import { interceptSpelling } from './spelling'
  9. import { interceptAsync } from './intercept-async'
  10. import { interceptFileUpload } from './upload'
  11. import { interceptProjectListing } from './project-list'
  12. import { interceptLinkedFile } from './linked-file'
  13. // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
  14. declare global {
  15. // eslint-disable-next-line @typescript-eslint/no-namespace,no-unused-vars
  16. namespace Cypress {
  17. // eslint-disable-next-line no-unused-vars
  18. interface Chainable {
  19. interceptAsync: typeof interceptAsync
  20. interceptCompile: typeof interceptCompile
  21. interceptEvents: typeof interceptEvents
  22. interceptSpelling: typeof interceptSpelling
  23. waitForCompile: typeof waitForCompile
  24. interceptDeferredCompile: typeof interceptDeferredCompile
  25. interceptFileUpload: typeof interceptFileUpload
  26. interceptProjectListing: typeof interceptProjectListing
  27. interceptLinkedFile: typeof interceptLinkedFile
  28. }
  29. }
  30. }
  31. Cypress.Commands.add('interceptAsync', interceptAsync)
  32. Cypress.Commands.add('interceptCompile', interceptCompile)
  33. Cypress.Commands.add('interceptEvents', interceptEvents)
  34. Cypress.Commands.add('interceptSpelling', interceptSpelling)
  35. Cypress.Commands.add('waitForCompile', waitForCompile)
  36. Cypress.Commands.add('interceptDeferredCompile', interceptDeferredCompile)
  37. Cypress.Commands.add('interceptFileUpload', interceptFileUpload)
  38. Cypress.Commands.add('interceptProjectListing', interceptProjectListing)
  39. Cypress.Commands.add('interceptLinkedFile', interceptLinkedFile)