@mtes-mct/monitor-ui 10.17.1 → 10.18.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [10.17.1](https://github.com/MTES-MCT/monitor-ui/compare/v10.17.0...v10.17.1) (2024-01-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **components:** truncate long titles in MapMenuDialog ([ce25040](https://github.com/MTES-MCT/monitor-ui/commit/ce250400ddd8c955783e1aed5c0253ed14eb3972))
7
+
1
8
  ## [10.17.0](https://github.com/MTES-MCT/monitor-ui/compare/v10.16.1...v10.17.0) (2024-01-03)
2
9
 
3
10
 
@@ -96,13 +96,15 @@ declare namespace Cypress {
96
96
  * body: {
97
97
  * property: 'VALUE',
98
98
  * }
99
- * }, 5)
99
+ * }, 5, response => {
100
+ * console.log('After response', response)
101
+ * })
100
102
  * .its('response.statusCode')
101
103
  * .should('eq', 201)
102
104
  * })
103
105
  * ```
104
106
  */
105
- waitForLastRequest(alias: string, partialRequest, maxRequests: number, level?)
107
+ waitForLastRequest(alias: string, partialRequest, maxRequests: number, level?, callback?: (response) => void)
106
108
  }
107
109
 
108
110
  type DateTuple = [number, number, number]
package/cypress/index.js CHANGED
@@ -1168,7 +1168,7 @@ function getTableRowByText(prevSubjectElements, text) {
1168
1168
  return (prevSubjectElement ? cy.wrap(prevSubjectElement) : cy.get('body')).first().contains(`.Table-SimpleTable tr`, text);
1169
1169
  }
1170
1170
 
1171
- function waitForLastRequest(alias, partialRequest, maxRequests, level = 0) {
1171
+ function waitForLastRequest(alias, partialRequest, maxRequests, level = 0, callback = ()=>{}) {
1172
1172
  if (level === maxRequests) {
1173
1173
  throw new Error(`${maxRequests} requests exceeded`);
1174
1174
  }
@@ -1177,7 +1177,7 @@ function waitForLastRequest(alias, partialRequest, maxRequests, level = 0) {
1177
1177
  // @ts-ignore
1178
1178
  const isMatch = Cypress._.isMatch(interception.request, partialRequest);
1179
1179
  if (isMatch) {
1180
- return interception;
1180
+ return callback(interception.response);
1181
1181
  }
1182
1182
  // eslint-disable-next-line no-console
1183
1183
  cy.log('Intercepted request', JSON.stringify(interception.request));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mtes-mct/monitor-ui",
3
3
  "description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
4
- "version": "10.17.1",
4
+ "version": "10.18.0",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {