-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.d.ts
31 lines (27 loc) · 826 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/// <reference types="cypress" />
type WaitUntilLog = Pick<Cypress.LogConfig, 'name' | 'message' | 'consoleProps'>
type ErrorMsgCallback<Subject = any> = (
result: Subject,
options: WaitUntilOptions<Subject>
) => string
interface WaitUntilOptions<Subject = any> {
timeout?: number
interval?: number
errorMsg?: string | ErrorMsgCallback<Subject>
description?: string
customMessage?: string
verbose?: boolean
customCheckMessage?: string
logger?: (logOptions: WaitUntilLog) => any
log?: boolean
}
declare namespace Cypress {
interface Chainable<Subject = any> {
waitUntil<ReturnType = any>(
checkFunction: (
subject: Subject | undefined
) => ReturnType | Chainable<ReturnType> | Promise<ReturnType>,
options?: WaitUntilOptions<Subject>
): Chainable<ReturnType>
}
}