@mtes-mct/monitor-ui 24.34.0 → 24.34.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [24.34.1](https://github.com/MTES-MCT/monitor-ui/compare/v24.34.0...v24.34.1) (2025-09-25)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **global:** fix cypress export ([b877a60](https://github.com/MTES-MCT/monitor-ui/commit/b877a6044d57ffd0723ee0e8da312d5b2856baec))
6
+
7
+ ### Buid System & Dependencies
8
+
9
+ * **dev-deps:** bump the all-non-major-dependencies group ([a32ebd1](https://github.com/MTES-MCT/monitor-ui/commit/a32ebd1879d2d4fb9f5444249f3f9720713b4465))
10
+
11
+ ### Documentation
12
+
13
+ * fix readme cypress links ([2b67682](https://github.com/MTES-MCT/monitor-ui/commit/2b676824228b1e333ce89ec73bbb9acadc305dce))
14
+
1
15
  ## [24.33.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.32.1...v24.33.0) (2025-09-16)
2
16
 
3
17
  ### Features
package/README.md CHANGED
@@ -94,15 +94,15 @@ Please read the [contributing document](CONTRIBUTING.md) for setup and contribut
94
94
  [img-coverage]: https://img.shields.io/codecov/c/github/MTES-MCT/monitor-ui?flag=unit&style=for-the-badge
95
95
  [img-documentation]: https://img.shields.io/badge/StoryBook-Docs-007ec6?logo=storybook&style=for-the-badge
96
96
  [img-e2e-tests]:
97
- https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/qnpjm2/main&label=E2E&logo=cypress&style=for-the-badge
97
+ https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/juvjsi/main&label=E2E&logo=cypress&style=for-the-badge
98
98
  [img-license]: https://img.shields.io/github/license/MTES-MCT/monitor-ui?style=for-the-badge
99
99
  [img-npm]: https://img.shields.io/npm/v/@mtes-mct/monitor-ui?style=for-the-badge
100
100
  [img-unit-tests]:
101
101
  https://img.shields.io/github/actions/workflow/status/MTES-MCT/monitor-ui/check.yml?branch=main&label=Unit&style=for-the-badge
102
102
  [lnk-coverage]: https://app.codecov.io/gh/MTES-MCT/monitor-ui
103
103
  [lnk-documentation]: https://mtes-mct.github.io/monitor-ui/?path=/docs/introduction--documentation
104
- [lnk-e2e-tests]: https://cloud.cypress.io/projects/qnpjm2/runs
105
- [lnk-e2e-tests]: https://cloud.cypress.io/projects/qnpjm2/runs
104
+ [lnk-e2e-tests]: https://cloud.cypress.io/projects/juvjsi/runs
105
+ [lnk-e2e-tests]: https://cloud.cypress.io/projects/juvjsi/runs
106
106
  [lnk-github-monitorenv]: https://github.com/MTES-MCT/monitorenv
107
107
  [lnk-github-monitorfish]: https://github.com/MTES-MCT/monitorfish
108
108
  [lnk-github-rapportnav]: https://github.com/MTES-MCT/rapportnav2
@@ -0,0 +1,122 @@
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
+ }