mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 05:00:06 +02:00

* [web] provide an actual rootFolder from EditorProviders in tests - Fixup SocketIOMock and ShareJS mocks to provide the complete interface - Extend SocketIOMock interface to count event listeners - Fixup test that did not expect to find a working rootDoc * [web] expose imageName from ProjectContext * [clsi-cache] check compiler settings before using compile from cache * [web] avoid fetching initial compile from clsi-cache in PDF detach tab GitOrigin-RevId: e3c754a7ceca55f03a317e1bc8ae45ed12cc2f02
56 lines
2.4 KiB
TypeScript
56 lines
2.4 KiB
TypeScript
import '@testing-library/cypress/add-commands'
|
|
import {
|
|
interceptCompile,
|
|
interceptCompileFromCacheRequest,
|
|
waitForCompile,
|
|
interceptDeferredCompile,
|
|
interceptCompileRequest,
|
|
} from './compile'
|
|
import { interceptEvents } from './events'
|
|
import { interceptAsync } from './intercept-async'
|
|
import { interceptFileUpload } from './upload'
|
|
import { interceptProjectListing } from './project-list'
|
|
import { interceptLinkedFile } from './linked-file'
|
|
import { interceptMathJax } from './mathjax'
|
|
import { interceptMetadata } from './metadata'
|
|
import { interceptTutorials } from './tutorials'
|
|
|
|
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
|
|
declare global {
|
|
// eslint-disable-next-line @typescript-eslint/no-namespace,no-unused-vars
|
|
namespace Cypress {
|
|
// eslint-disable-next-line no-unused-vars
|
|
interface Chainable {
|
|
interceptAsync: typeof interceptAsync
|
|
interceptCompile: typeof interceptCompile
|
|
interceptCompileRequest: typeof interceptCompileRequest
|
|
interceptCompileFromCacheRequest: typeof interceptCompileFromCacheRequest
|
|
interceptEvents: typeof interceptEvents
|
|
interceptMetadata: typeof interceptMetadata
|
|
waitForCompile: typeof waitForCompile
|
|
interceptDeferredCompile: typeof interceptDeferredCompile
|
|
interceptFileUpload: typeof interceptFileUpload
|
|
interceptProjectListing: typeof interceptProjectListing
|
|
interceptLinkedFile: typeof interceptLinkedFile
|
|
interceptMathJax: typeof interceptMathJax
|
|
interceptTutorials: typeof interceptTutorials
|
|
}
|
|
}
|
|
}
|
|
|
|
Cypress.Commands.add('interceptAsync', interceptAsync)
|
|
Cypress.Commands.add('interceptCompile', interceptCompile)
|
|
Cypress.Commands.add('interceptCompileRequest', interceptCompileRequest)
|
|
Cypress.Commands.add(
|
|
'interceptCompileFromCacheRequest',
|
|
interceptCompileFromCacheRequest
|
|
)
|
|
Cypress.Commands.add('interceptEvents', interceptEvents)
|
|
Cypress.Commands.add('interceptMetadata', interceptMetadata)
|
|
Cypress.Commands.add('waitForCompile', waitForCompile)
|
|
Cypress.Commands.add('interceptDeferredCompile', interceptDeferredCompile)
|
|
Cypress.Commands.add('interceptFileUpload', interceptFileUpload)
|
|
Cypress.Commands.add('interceptProjectListing', interceptProjectListing)
|
|
Cypress.Commands.add('interceptLinkedFile', interceptLinkedFile)
|
|
Cypress.Commands.add('interceptMathJax', interceptMathJax)
|
|
Cypress.Commands.add('interceptTutorials', interceptTutorials)
|