-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.d.ts
55 lines (48 loc) · 1.88 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/// <reference types="cypress" />
declare namespace Cypress {
interface Chainable {
/**
* Command to save current localStorage values into an internal "snapshot"
* @param {string} snapshotName - Name of the snapshot
* @example cy.saveLocalStorage()
*/
saveLocalStorage(snapshotName?: string): Chainable<undefined>;
/**
* Command to restore localStorage to previously "snapshot" saved values
* @param {string} snapshotName - Name of the snapshot
* @example cy.restoreLocalStorage()
*/
restoreLocalStorage(snapshotName?: string): Chainable<undefined>;
/**
* Command to clear localStorage "snapshot" values
* @param {string} snapshotName - Name of the snapshot
* @example cy.clearLocalStorageSnapshot()
*/
clearLocalStorageSnapshot(snapshotName?: string): Chainable<undefined>;
/**
* Command to get localStorage item value
* @param {string} itemKeyName - localStorage item to get
* @example cy.getLocalStorage("cookies-accepted")
*/
getLocalStorage(itemKeyName: string): Chainable<string | null>;
/**
* Command to set localStorage item value
* @param {string} itemKeyName - localStorage item to set
* @param {string} value - value to be set
* @example cy.setLocalStorage("cookies-accepted", "true")
*/
setLocalStorage(itemKeyName: string, value: string): Chainable<undefined>;
/**
* Command to remove localStorage item
* @param {string} itemKeyName - localStorage item to remove
* @example cy.removeLocalStorage("cookies-accepted")
*/
removeLocalStorage(itemKeyName: string): Chainable<undefined>;
/**
* Command to disable localStorage
* @param {object} options - Options for disabling localStorage
* @example cy.disableLocalStorage()
*/
disableLocalStorage(options?: { withError: Error }): Chainable<undefined>;
}
}