mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 13:52:02 -05:00
28d8c2b135
[visual] Add cypress tests for table generator GitOrigin-RevId: 03bdd315221f8a5998fd37de4c955635dcc86148
23 lines
538 B
TypeScript
23 lines
538 B
TypeScript
const MATHJAX_STUB = `
|
|
window.MathJax = {
|
|
startup: {
|
|
promise: Promise.resolve()
|
|
},
|
|
svgStylesheet: () => document.createElement("STYLE")
|
|
}
|
|
`
|
|
|
|
export const interceptMathJax = () => {
|
|
cy.window().then(win => {
|
|
win.metaAttributesCache.set(
|
|
'ol-mathJax3Path',
|
|
'https://unpkg.com/mathjax@3.2.2/es5/tex-svg-full.js'
|
|
)
|
|
})
|
|
cy.intercept('GET', '/js/libs/mathjax3/es5/tex-svg-full.js*', MATHJAX_STUB)
|
|
cy.intercept(
|
|
'GET',
|
|
'https://unpkg.com/mathjax@3.2.2/es5/tex-svg-full.js',
|
|
MATHJAX_STUB
|
|
)
|
|
}
|