-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathindex.d.ts
40 lines (37 loc) · 917 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
32
33
34
35
36
37
38
39
40
declare namespace Cypress {
type FixtureEncoding =
| 'ascii'
| 'base64'
| 'binary'
| 'hex'
| 'latin1'
| 'utf8'
| 'utf-8'
| 'ucs2'
| 'ucs-2'
| 'utf16le'
| 'utf-16le';
type FixtureData =
| string
| {
filePath?: string;
fileContent?: Blob;
fileName?: string;
encoding?: FixtureEncoding;
mimeType?: string;
lastModified?: number;
};
interface FileProcessingOptions {
subjectType?: 'input' | 'drag-n-drop';
force?: boolean;
allowEmpty?: boolean;
}
interface Chainable<Subject = any> {
/**
* Command to attach file(s) to given HTML element as subject
* @param fixture file to attach
* @param processingOpts affects the way of fixture processing
*/
attachFile(fixture: FixtureData | FixtureData[], processingOpts?: FileProcessingOptions): Chainable<Subject>;
}
}