@mtes-mct/monitor-ui 24.32.1 → 24.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,122 +0,0 @@
1
- /// <reference types="cypress" />
2
-
3
- declare namespace Cypress {
4
- interface Chainable {
5
- /**
6
- * Clicks on a button with the given text content / aria-label attribute / title attribute.
7
- *
8
- * @description
9
- * `label` must match the exact button's text content / aria-label attribute / title attribute.
10
- */
11
- clickButton(
12
- label: string,
13
- options?: Partial<{
14
- index: number
15
- withinSelector: string
16
- withoutScroll: boolean
17
- }>
18
- ): Chainable<JQuery<HTMLButtonElement>>
19
-
20
- clickLink(linkText: string): Chainable<JQuery<HTMLAnchorElement>>
21
-
22
- /**
23
- * @description
24
- * Useful to close modals.
25
- */
26
- clickOutside(xPosition?: number, yPosition?: number): void
27
-
28
- /**
29
- * @description
30
- * You can set the `retries` option to a number greater than 5 (default) to retry the action in case of failure.
31
- * You can also set the `force` option to `true` to force the action without waiting for the element to be visible.
32
- *
33
- * ⚠️ In order to ensure backward compatibility, the `force` option is set to `true` by default.
34
- * This will be changed to `false` in the next major version.
35
- *
36
- * @example
37
- * ```ts
38
- * cy.fill('My TextInput / Textarea', 'Hello World')
39
- * cy.fill('My NumberInput', 42)
40
- * cy.fill('My Checkbox', true) // or `false` to uncheck
41
- * cy.fill('My MultiRadio / Select', 'First Option')
42
- * cy.fill('My CheckPicker / MultiCheckbox / MultiSelect', ['First Option', 'Second Option'])
43
- * cy.fill('My DatePicker', [2020, 12, 31])
44
- * cy.fill('My DatePicker', [2020, 12, 31, 23, 59])
45
- * cy.fill('My DateRangePicker', [[2020, 12, 31], [2021, 1, 1]])
46
- * cy.fill('My DateRangePicker', [[2020, 12, 31, 23, 59], [2021, 1, 1, 23, 59]])
47
- *
48
- * // Clear any field except the `<MultiRadio />` which can't be cleared
49
- * cy.fill('My Field', undefined)
50
- * ```
51
- */
52
- fill(label: string, value: any, options?: Partial<FillOptions>): void
53
-
54
- forceCheck(options?: Partial<CheckOptions>): Chainable<JQuery<HTMLElement>>
55
- forceClear(options?: Partial<ClearOptions>): Chainable<JQuery<HTMLElement>>
56
- forceClick(options?: Partial<ClickOptions>): Chainable<JQuery<HTMLElement>>
57
- forceType(text: string, options?: Partial<TypeOption>): Chainable<JQuery<HTMLElement>>
58
- forceUncheck(options?: Partial<CheckOptions>): Chainable<JQuery<HTMLElement>>
59
-
60
- /**
61
- * @example
62
- * ```ts
63
- * cy.getDataCy('my-list').should('have.length', 42)
64
- * ```
65
- */
66
- getDataCy(dataCy: string): Chainable<JQuery<HTMLElement>>
67
-
68
- /**
69
- * @description Only works with `<SimpleTable />` tables.
70
- *
71
- * @example
72
- * ```ts
73
- * cy.getTableRowById(42)
74
- * cy.getDataCy('my-list').getTableRowByText(42).clickButton('Edit')
75
- * ```
76
- */
77
- getTableRowById(id: number | string): Chainable<JQuery<HTMLElement>>
78
-
79
- /**
80
- * @description Only works with `<SimpleTable />` tables.
81
- *
82
- * @example
83
- * ```ts
84
- * cy.getTableRowByText('First Row Name')
85
- * cy.getDataCy('my-list').getTableRowByText('First Row Name').clickButton('Edit')
86
- * ```
87
- */
88
- getTableRowByText(text: string): Chainable<JQuery<HTMLElement>>
89
-
90
- /**
91
- * @description Assert the request payload when a form is auto-saving and the requests number is not determinist
92
- *
93
- * @example
94
- * ```ts
95
- * cy.waitForLastRequest('@updateMissionAction',
96
- * {
97
- * body: {
98
- * property: 'VALUE',
99
- * }
100
- * }, 5, response => {
101
- * console.log('After response', response)
102
- * })
103
- * .its('response.statusCode')
104
- * .should('eq', 201)
105
- * })
106
- * ```
107
- */
108
- waitForLastRequest(alias: string, partialRequest, maxRequests: number, level?, callback?: (response) => void)
109
- }
110
-
111
- type DateTuple = [number, number, number]
112
- type DateWithTimeTuple = [number, number, number, number, number]
113
-
114
- type DateRangeTuple = [DateTuple, DateTuple]
115
- type DateWithTimeRangeTuple = [DateWithTimeTuple, DateWithTimeTuple]
116
-
117
- interface FillOptions extends Forceable {
118
- delay: number
119
- index: number
120
- retries: number
121
- }
122
- }