2022-06-08 03:39:09 -04:00
|
|
|
import '@testing-library/cypress/add-commands'
|
2023-03-06 07:50:17 -05:00
|
|
|
import {
|
|
|
|
interceptCompile,
|
|
|
|
waitForCompile,
|
|
|
|
interceptDeferredCompile,
|
|
|
|
} from './compile'
|
2022-06-08 03:39:09 -04:00
|
|
|
import { interceptEvents } from './events'
|
2022-12-12 07:54:15 -05:00
|
|
|
import { interceptSpelling } from './spelling'
|
2022-06-08 03:39:09 -04:00
|
|
|
|
|
|
|
// 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
|
2022-12-12 07:54:15 -05:00
|
|
|
interceptSpelling: typeof interceptSpelling
|
2023-03-06 07:50:17 -05:00
|
|
|
waitForCompile: typeof waitForCompile
|
|
|
|
interceptDeferredCompile: typeof interceptDeferredCompile
|
2023-01-04 06:14:57 -05:00
|
|
|
index: () => Chainable<number>
|
2022-06-08 03:39:09 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Cypress.Commands.add('interceptCompile', interceptCompile)
|
|
|
|
Cypress.Commands.add('interceptEvents', interceptEvents)
|
2022-12-12 07:54:15 -05:00
|
|
|
Cypress.Commands.add('interceptSpelling', interceptSpelling)
|
2023-03-06 07:50:17 -05:00
|
|
|
Cypress.Commands.add('waitForCompile', waitForCompile)
|
|
|
|
Cypress.Commands.add('interceptDeferredCompile', interceptDeferredCompile)
|
2023-01-04 06:14:57 -05:00
|
|
|
Cypress.Commands.add('index', { prevSubject: true }, subject => {
|
|
|
|
return cy.wrap(subject).invoke('index')
|
|
|
|
})
|