-
Notifications
You must be signed in to change notification settings - Fork 5
/
global.d.ts
38 lines (32 loc) · 991 Bytes
/
global.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
32
33
34
35
36
37
38
import { RunOptions } from 'axe-core'
declare module '@playwright/test' {
export interface PlaywrightTestOptions {
axeOptions?: RunOptions
}
}
interface MatcherOptions extends RunOptions {
/**
* Maximum time in milliseconds, defaults to 5 seconds.
*/
timeout?: number
/**
* Custom report filename
* @default 'axe-report.html'
*/
filename?: string
}
interface AxePlaywrightMatchers<R> {
/**
* Verifies that the page, frame, or locator passes Axe tests.
* @param options - Options to pass to axe-core. See the [axe-core documentation](https://www.deque.com/axe/core-documentation/api-documentation/#options-parameter) for more details.
*/
toPassAxe(options?: MatcherOptions): Promise<R>
}
declare global {
namespace PlaywrightTest {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Matchers<R> extends AxePlaywrightMatchers<R> {}
}
}
declare const matchers: AxePlaywrightMatchers
export default matchers