forked from mfrachet/cypress-audit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
70 lines (65 loc) · 1.77 KB
/
index.d.ts
File metadata and controls
70 lines (65 loc) · 1.77 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/// <reference types="cypress" />
declare namespace Cypress {
type AccessibilityStandard = 'Section508' | 'WCAG2A' | 'WCAG2AA' | 'WCAG2AAA';
interface Options {
actions?: string[];
headers?: object;
hideElements?: string;
ignore?: string[];
ignoreUrl?: boolean;
includeNotices?: boolean;
includeWarnings?: boolean;
level?: string;
method?: string;
postData?: string;
reporter?: string;
rootElement?: string;
runners?: string[];
rules?: string[];
screenCapture?: string;
standard?: AccessibilityStandard;
threshold?: number;
timeout?: number;
userAgent?: string;
wait?: number;
}
interface LighthouseThresholds {
performance?: number;
accessibility?: number;
'best-practices'?: number;
seo?: number;
pwa?: number;
'first-contentful-paint'?: number;
'largest-contentful-paint'?: number;
'first-meaningful-paint'?: number;
'load-fast-enough-for-pwa'?: number;
'speed-index'?: number;
'estimated-input-latency'?: number;
'max-potential-fid'?: number;
'server-response-time'?: number;
'first-cpu-idle'?: number;
interactive?: number;
'mainthread-work-breakdown'?: number;
'bootup-time'?: number;
'network-rtt'?: number;
'network-server-latency'?: number;
metrics?: number;
'uses-long-cache-ttl'?: number;
'total-byte-weight'?: number;
'dom-size'?: number;
}
interface Chainable<Subject> {
/**
* Runs a pa11y audit
* @example
* cy.pa11y(opts)
*/
pa11y(opts?: Options);
/**
* Runs a lighthouse audit
* @example
* cy.lighthouse(thresholds,opts,config)
*/
lighthouse(thresholds?: LighthouseThresholds, opts?: any, config?: any);
}
}