mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
Add Cypress component tests for AI error assistant (#19256)
GitOrigin-RevId: 42e9e69317c97263cdcb55372e4a2cb41bccf516
This commit is contained in:
parent
87d1c08e2f
commit
bac35566ff
3 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
export const interceptEvents = () => {
|
export const interceptEvents = () => {
|
||||||
cy.intercept('POST', '/event/*', {
|
cy.intercept('POST', '/event/*', {
|
||||||
statusCode: 204,
|
statusCode: 204,
|
||||||
})
|
}).as('createEvent')
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { interceptProjectListing } from './project-list'
|
||||||
import { interceptLinkedFile } from './linked-file'
|
import { interceptLinkedFile } from './linked-file'
|
||||||
import { interceptMathJax } from './mathjax'
|
import { interceptMathJax } from './mathjax'
|
||||||
import { interceptMetadata } from './metadata'
|
import { interceptMetadata } from './metadata'
|
||||||
|
import { interceptTutorials } from './tutorials'
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
|
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-namespace
|
||||||
declare global {
|
declare global {
|
||||||
|
@ -30,6 +31,7 @@ declare global {
|
||||||
interceptProjectListing: typeof interceptProjectListing
|
interceptProjectListing: typeof interceptProjectListing
|
||||||
interceptLinkedFile: typeof interceptLinkedFile
|
interceptLinkedFile: typeof interceptLinkedFile
|
||||||
interceptMathJax: typeof interceptMathJax
|
interceptMathJax: typeof interceptMathJax
|
||||||
|
interceptTutorials: typeof interceptTutorials
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,3 +47,4 @@ Cypress.Commands.add('interceptFileUpload', interceptFileUpload)
|
||||||
Cypress.Commands.add('interceptProjectListing', interceptProjectListing)
|
Cypress.Commands.add('interceptProjectListing', interceptProjectListing)
|
||||||
Cypress.Commands.add('interceptLinkedFile', interceptLinkedFile)
|
Cypress.Commands.add('interceptLinkedFile', interceptLinkedFile)
|
||||||
Cypress.Commands.add('interceptMathJax', interceptMathJax)
|
Cypress.Commands.add('interceptMathJax', interceptMathJax)
|
||||||
|
Cypress.Commands.add('interceptTutorials', interceptTutorials)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
export const interceptTutorials = () => {
|
||||||
|
cy.intercept('POST', '/tutorial/**', {
|
||||||
|
statusCode: 204,
|
||||||
|
}).as('completeTutorial')
|
||||||
|
}
|
Loading…
Reference in a new issue