index.ts 2.0 KB

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