index.ts 2.2 KB

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