index.ts 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import '@testing-library/cypress/add-commands'
  2. import {
  3. interceptCompile,
  4. interceptCompileFromCacheRequest,
  5. waitForCompile,
  6. interceptDeferredCompile,
  7. interceptCompileRequest,
  8. } from './compile'
  9. import { interceptEvents } from './events'
  10. import { interceptAsync } from './intercept-async'
  11. import { interceptFileUpload } from './upload'
  12. import { interceptProjectListing } from './project-list'
  13. import { interceptLinkedFile } from './linked-file'
  14. import { interceptMathJax } from './mathjax'
  15. import { interceptMetadata } from './metadata'
  16. import { interceptTutorials } from './tutorials'
  17. // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
  18. declare global {
  19. // eslint-disable-next-line @typescript-eslint/no-namespace,no-unused-vars
  20. namespace Cypress {
  21. // eslint-disable-next-line no-unused-vars
  22. interface Chainable {
  23. interceptAsync: typeof interceptAsync
  24. interceptCompile: typeof interceptCompile
  25. interceptCompileRequest: typeof interceptCompileRequest
  26. interceptCompileFromCacheRequest: typeof interceptCompileFromCacheRequest
  27. interceptEvents: typeof interceptEvents
  28. interceptMetadata: typeof interceptMetadata
  29. waitForCompile: typeof waitForCompile
  30. interceptDeferredCompile: typeof interceptDeferredCompile
  31. interceptFileUpload: typeof interceptFileUpload
  32. interceptProjectListing: typeof interceptProjectListing
  33. interceptLinkedFile: typeof interceptLinkedFile
  34. interceptMathJax: typeof interceptMathJax
  35. interceptTutorials: typeof interceptTutorials
  36. }
  37. }
  38. }
  39. Cypress.Commands.add('interceptAsync', interceptAsync)
  40. Cypress.Commands.add('interceptCompile', interceptCompile)
  41. Cypress.Commands.add('interceptCompileRequest', interceptCompileRequest)
  42. Cypress.Commands.add(
  43. 'interceptCompileFromCacheRequest',
  44. interceptCompileFromCacheRequest
  45. )
  46. Cypress.Commands.add('interceptEvents', interceptEvents)
  47. Cypress.Commands.add('interceptMetadata', interceptMetadata)
  48. Cypress.Commands.add('waitForCompile', waitForCompile)
  49. Cypress.Commands.add('interceptDeferredCompile', interceptDeferredCompile)
  50. Cypress.Commands.add('interceptFileUpload', interceptFileUpload)
  51. Cypress.Commands.add('interceptProjectListing', interceptProjectListing)
  52. Cypress.Commands.add('interceptLinkedFile', interceptLinkedFile)
  53. Cypress.Commands.add('interceptMathJax', interceptMathJax)
  54. Cypress.Commands.add('interceptTutorials', interceptTutorials)