mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
9f1ddf6a64
[web] Add cypress tests for emacs and vim keybindings GitOrigin-RevId: 17ada42d39ed81e2a0947fd102e5782428c1c619
25 lines
929 B
TypeScript
25 lines
929 B
TypeScript
import '@testing-library/cypress/add-commands'
|
|
import { interceptCompile } from './compile'
|
|
import { interceptEvents } from './events'
|
|
import { interceptSpelling } from './spelling'
|
|
|
|
// 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 {
|
|
interceptCompile: typeof interceptCompile
|
|
interceptEvents: typeof interceptEvents
|
|
interceptSpelling: typeof interceptSpelling
|
|
index: () => Chainable<number>
|
|
}
|
|
}
|
|
}
|
|
|
|
Cypress.Commands.add('interceptCompile', interceptCompile)
|
|
Cypress.Commands.add('interceptEvents', interceptEvents)
|
|
Cypress.Commands.add('interceptSpelling', interceptSpelling)
|
|
Cypress.Commands.add('index', { prevSubject: true }, subject => {
|
|
return cy.wrap(subject).invoke('index')
|
|
})
|