index.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. import { interceptMathJax } from './mathjax'
  14. // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
  15. declare global {
  16. // eslint-disable-next-line @typescript-eslint/no-namespace,no-unused-vars
  17. namespace Cypress {
  18. // eslint-disable-next-line no-unused-vars
  19. interface Chainable {
  20. interceptAsync: typeof interceptAsync
  21. interceptCompile: typeof interceptCompile
  22. interceptEvents: typeof interceptEvents
  23. interceptSpelling: typeof interceptSpelling
  24. waitForCompile: typeof waitForCompile
  25. interceptDeferredCompile: typeof interceptDeferredCompile
  26. interceptFileUpload: typeof interceptFileUpload
  27. interceptProjectListing: typeof interceptProjectListing
  28. interceptLinkedFile: typeof interceptLinkedFile
  29. interceptMathJax: typeof interceptMathJax
  30. }
  31. }
  32. }
  33. Cypress.Commands.add('interceptAsync', interceptAsync)
  34. Cypress.Commands.add('interceptCompile', interceptCompile)
  35. Cypress.Commands.add('interceptEvents', interceptEvents)
  36. Cypress.Commands.add('interceptSpelling', interceptSpelling)
  37. Cypress.Commands.add('waitForCompile', waitForCompile)
  38. Cypress.Commands.add('interceptDeferredCompile', interceptDeferredCompile)
  39. Cypress.Commands.add('interceptFileUpload', interceptFileUpload)
  40. Cypress.Commands.add('interceptProjectListing', interceptProjectListing)
  41. Cypress.Commands.add('interceptLinkedFile', interceptLinkedFile)
  42. Cypress.Commands.add('interceptMathJax', interceptMathJax)