@portnet/ui 6.0.1 → 6.0.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.
Files changed (158) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/esm/index.js +18 -0
  3. package/dist/esm/index.js.map +1 -1
  4. package/dist/esm/v2/__tests__/FieldError.test.js +0 -1
  5. package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -1
  6. package/dist/esm/v2/__tests__/FieldWidth.test.js +146 -0
  7. package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -0
  8. package/dist/esm/v2/__tests__/FileCard.test.js +0 -1
  9. package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
  10. package/dist/esm/v2/__tests__/FormikCheckbox.test.js +265 -0
  11. package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -0
  12. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +248 -0
  13. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
  14. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js +380 -0
  15. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
  16. package/dist/esm/v2/__tests__/MobileRowCard.test.js +0 -1
  17. package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -1
  18. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
  19. package/dist/esm/v2/__tests__/labels-merge.test.js +0 -1
  20. package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -1
  21. package/dist/esm/v2/components/DateTimePicker.js +37 -4
  22. package/dist/esm/v2/components/DateTimePicker.js.map +1 -1
  23. package/dist/esm/v2/components/Field.js +63 -1
  24. package/dist/esm/v2/components/Field.js.map +1 -1
  25. package/dist/esm/v2/components/index.js +27 -0
  26. package/dist/esm/v2/components/index.js.map +1 -1
  27. package/dist/esm/v2/index.js +12 -1
  28. package/dist/esm/v2/index.js.map +1 -1
  29. package/dist/esm/v2/patterns/FavoriteColumn.js +14 -61
  30. package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -1
  31. package/dist/esm/v2/patterns/FormikCheckbox.js +140 -0
  32. package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -0
  33. package/dist/esm/v2/patterns/FormikCombobox.js +5 -2
  34. package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
  35. package/dist/esm/v2/patterns/FormikDatePicker.js +13 -47
  36. package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
  37. package/dist/esm/v2/patterns/FormikDateTimePicker.js +150 -0
  38. package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -0
  39. package/dist/esm/v2/patterns/FormikInput.js +5 -2
  40. package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
  41. package/dist/esm/v2/patterns/FormikRadioGroup.js +141 -0
  42. package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -0
  43. package/dist/esm/v2/patterns/FormikSelect.js +5 -2
  44. package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
  45. package/dist/esm/v2/patterns/FormikTextarea.js +5 -2
  46. package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
  47. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +25 -8
  48. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  49. package/dist/esm/v2/patterns/RowFavoriteToggle.js +122 -0
  50. package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -0
  51. package/dist/esm/v2/patterns/_pickerSerialisation.js +74 -0
  52. package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -0
  53. package/dist/esm/v2/patterns/index.js +83 -0
  54. package/dist/esm/v2/patterns/index.js.map +1 -1
  55. package/dist/esm/v2/personalization/capabilities/gridPreferences.js +209 -0
  56. package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -0
  57. package/dist/esm/v2/personalization/capabilities/index.js +5 -0
  58. package/dist/esm/v2/personalization/capabilities/index.js.map +1 -1
  59. package/dist/esm/v2/personalization/index.js +18 -0
  60. package/dist/esm/v2/personalization/index.js.map +1 -1
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +14 -0
  64. package/dist/index.js.map +1 -1
  65. package/dist/v2/__tests__/FieldError.test.js +26 -30
  66. package/dist/v2/__tests__/FieldError.test.js.map +1 -1
  67. package/dist/v2/__tests__/FieldWidth.test.js +150 -0
  68. package/dist/v2/__tests__/FieldWidth.test.js.map +1 -0
  69. package/dist/v2/__tests__/FileCard.test.js +25 -29
  70. package/dist/v2/__tests__/FileCard.test.js.map +1 -1
  71. package/dist/v2/__tests__/FormikCheckbox.test.js +268 -0
  72. package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -0
  73. package/dist/v2/__tests__/FormikDateTimePicker.test.js +247 -0
  74. package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
  75. package/dist/v2/__tests__/FormikRadioGroup.test.js +381 -0
  76. package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
  77. package/dist/v2/__tests__/MobileRowCard.test.js +52 -56
  78. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
  79. package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
  80. package/dist/v2/__tests__/labels-merge.test.js +20 -24
  81. package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
  82. package/dist/v2/components/DateTimePicker.d.ts.map +1 -1
  83. package/dist/v2/components/DateTimePicker.js +37 -4
  84. package/dist/v2/components/DateTimePicker.js.map +1 -1
  85. package/dist/v2/components/Field.d.ts +59 -1
  86. package/dist/v2/components/Field.d.ts.map +1 -1
  87. package/dist/v2/components/Field.js +62 -2
  88. package/dist/v2/components/Field.js.map +1 -1
  89. package/dist/v2/components/index.d.ts +27 -0
  90. package/dist/v2/components/index.d.ts.map +1 -1
  91. package/dist/v2/components/index.js.map +1 -1
  92. package/dist/v2/index.d.ts.map +1 -1
  93. package/dist/v2/index.js.map +1 -1
  94. package/dist/v2/patterns/FavoriteColumn.d.ts +9 -9
  95. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -1
  96. package/dist/v2/patterns/FavoriteColumn.js +14 -61
  97. package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
  98. package/dist/v2/patterns/FormikCheckbox.d.ts +77 -0
  99. package/dist/v2/patterns/FormikCheckbox.d.ts.map +1 -0
  100. package/dist/v2/patterns/FormikCheckbox.js +147 -0
  101. package/dist/v2/patterns/FormikCheckbox.js.map +1 -0
  102. package/dist/v2/patterns/FormikCombobox.d.ts +7 -1
  103. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -1
  104. package/dist/v2/patterns/FormikCombobox.js +5 -2
  105. package/dist/v2/patterns/FormikCombobox.js.map +1 -1
  106. package/dist/v2/patterns/FormikDatePicker.d.ts +13 -1
  107. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -1
  108. package/dist/v2/patterns/FormikDatePicker.js +33 -66
  109. package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
  110. package/dist/v2/patterns/FormikDateTimePicker.d.ts +111 -0
  111. package/dist/v2/patterns/FormikDateTimePicker.d.ts.map +1 -0
  112. package/dist/v2/patterns/FormikDateTimePicker.js +158 -0
  113. package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -0
  114. package/dist/v2/patterns/FormikInput.d.ts +11 -1
  115. package/dist/v2/patterns/FormikInput.d.ts.map +1 -1
  116. package/dist/v2/patterns/FormikInput.js +5 -2
  117. package/dist/v2/patterns/FormikInput.js.map +1 -1
  118. package/dist/v2/patterns/FormikRadioGroup.d.ts +80 -0
  119. package/dist/v2/patterns/FormikRadioGroup.d.ts.map +1 -0
  120. package/dist/v2/patterns/FormikRadioGroup.js +148 -0
  121. package/dist/v2/patterns/FormikRadioGroup.js.map +1 -0
  122. package/dist/v2/patterns/FormikSelect.d.ts +9 -1
  123. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -1
  124. package/dist/v2/patterns/FormikSelect.js +5 -2
  125. package/dist/v2/patterns/FormikSelect.js.map +1 -1
  126. package/dist/v2/patterns/FormikTextarea.d.ts +9 -1
  127. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -1
  128. package/dist/v2/patterns/FormikTextarea.js +5 -2
  129. package/dist/v2/patterns/FormikTextarea.js.map +1 -1
  130. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +14 -1
  131. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -1
  132. package/dist/v2/patterns/KeyboardShortcutsHelp.js +25 -8
  133. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  134. package/dist/v2/patterns/RowFavoriteToggle.d.ts +92 -0
  135. package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -0
  136. package/dist/v2/patterns/RowFavoriteToggle.js +127 -0
  137. package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -0
  138. package/dist/v2/patterns/_pickerSerialisation.d.ts +44 -0
  139. package/dist/v2/patterns/_pickerSerialisation.d.ts.map +1 -0
  140. package/dist/v2/patterns/_pickerSerialisation.js +81 -0
  141. package/dist/v2/patterns/_pickerSerialisation.js.map +1 -0
  142. package/dist/v2/patterns/index.d.ts +87 -0
  143. package/dist/v2/patterns/index.d.ts.map +1 -1
  144. package/dist/v2/patterns/index.js +34 -0
  145. package/dist/v2/patterns/index.js.map +1 -1
  146. package/dist/v2/personalization/capabilities/gridPreferences.d.ts +100 -0
  147. package/dist/v2/personalization/capabilities/gridPreferences.d.ts.map +1 -0
  148. package/dist/v2/personalization/capabilities/gridPreferences.js +215 -0
  149. package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -0
  150. package/dist/v2/personalization/capabilities/index.d.ts +6 -0
  151. package/dist/v2/personalization/capabilities/index.d.ts.map +1 -1
  152. package/dist/v2/personalization/capabilities/index.js +13 -0
  153. package/dist/v2/personalization/capabilities/index.js.map +1 -1
  154. package/dist/v2/personalization/index.d.ts +18 -0
  155. package/dist/v2/personalization/index.d.ts.map +1 -1
  156. package/dist/v2/personalization/index.js +13 -0
  157. package/dist/v2/personalization/index.js.map +1 -1
  158. package/package.json +1 -1
@@ -1,14 +1,10 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
3
  require("@testing-library/jest-dom");
5
- var React = _interopRequireWildcard(require("react"));
6
- var _react2 = require("@testing-library/react");
4
+ var _react = require("@testing-library/react");
7
5
  var _MobileRowCard = _interopRequireDefault(require("../components/MobileRowCard"));
8
6
  var _jsxRuntime = require("react/jsx-runtime");
9
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
8
  /**
13
9
  * MobileRowCard — slot contract tests.
14
10
  *
@@ -35,36 +31,36 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
35
31
  * open for all three props.
36
32
  */describe("MobileRowCard — slot rendering", function () {
37
33
  test("renders title, subtitle and meta, omitting lines with no content", function () {
38
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
34
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
39
35
  title: "2025-IM-0042",
40
36
  subtitle: "SOFRANE SA",
41
37
  meta: ["12/05/2026", "3 pièces"]
42
38
  }));
43
- expect(_react2.screen.getByText("2025-IM-0042")).toBeInTheDocument();
44
- expect(_react2.screen.getByText("SOFRANE SA")).toBeInTheDocument();
39
+ expect(_react.screen.getByText("2025-IM-0042")).toBeInTheDocument();
40
+ expect(_react.screen.getByText("SOFRANE SA")).toBeInTheDocument();
45
41
  // meta joins with " · " into a single node
46
- expect(_react2.screen.getByText("12/05/2026 · 3 pièces")).toBeInTheDocument();
42
+ expect(_react.screen.getByText("12/05/2026 · 3 pièces")).toBeInTheDocument();
47
43
  });
48
44
  test("meta drops null / empty entries rather than rendering stray separators", function () {
49
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
45
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
50
46
  title: "X",
51
47
  meta: ["Émise 01/01/2026", null, "", undefined]
52
48
  }));
53
- expect(_react2.screen.getByText("Émise 01/01/2026")).toBeInTheDocument();
54
- expect(_react2.screen.queryByText(/·/)).not.toBeInTheDocument();
49
+ expect(_react.screen.getByText("Émise 01/01/2026")).toBeInTheDocument();
50
+ expect(_react.screen.queryByText(/·/)).not.toBeInTheDocument();
55
51
  });
56
52
  test("a string title gets a native tooltip; a node title does not stringify", function () {
57
- var _render = (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
53
+ var _render = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
58
54
  title: "Long reference"
59
55
  })),
60
56
  rerender = _render.rerender;
61
- expect(_react2.screen.getByText("Long reference")).toHaveAttribute("title", "Long reference");
57
+ expect(_react.screen.getByText("Long reference")).toHaveAttribute("title", "Long reference");
62
58
  rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
63
59
  title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
64
60
  children: "Node title"
65
61
  })
66
62
  }));
67
- expect(_react2.screen.getByText("Node title")).toBeInTheDocument();
63
+ expect(_react.screen.getByText("Node title")).toBeInTheDocument();
68
64
  /* The regression guarded here: wrapping a node yielded title="[object
69
65
  * Object]". Asserted with queryByTitle rather than `.closest("[title]")`
70
66
  * so it stays a Testing-Library query (testing-library/no-node-access).
@@ -73,12 +69,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
73
69
  * attribute in exactly two places (the title Box and the subtitle Box) and
74
70
  * only when the value is a string, so with a node title and no subtitle the
75
71
  * whole tree must be title-less. */
76
- expect(_react2.screen.queryByTitle(/./)).not.toBeInTheDocument();
72
+ expect(_react.screen.queryByTitle(/./)).not.toBeInTheDocument();
77
73
  });
78
74
  });
79
75
  describe("MobileRowCard — kv slot", function () {
80
76
  test("renders each pair as a KV label/value unit", function () {
81
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
77
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
82
78
  title: "ref",
83
79
  kv: [{
84
80
  label: "Catégorie",
@@ -88,16 +84,16 @@ describe("MobileRowCard — kv slot", function () {
88
84
  value: "SOFRANE SA"
89
85
  }]
90
86
  }));
91
- expect(_react2.screen.getByText("Catégorie")).toBeInTheDocument();
92
- expect(_react2.screen.getByText("CONTINGENT")).toBeInTheDocument();
93
- expect(_react2.screen.getByText("Importateur")).toBeInTheDocument();
94
- expect(_react2.screen.getByText("SOFRANE SA")).toBeInTheDocument();
87
+ expect(_react.screen.getByText("Catégorie")).toBeInTheDocument();
88
+ expect(_react.screen.getByText("CONTINGENT")).toBeInTheDocument();
89
+ expect(_react.screen.getByText("Importateur")).toBeInTheDocument();
90
+ expect(_react.screen.getByText("SOFRANE SA")).toBeInTheDocument();
95
91
  });
96
92
  test("an empty value KEEPS the pair and shows KV's own em-dash placeholder", function () {
97
93
  // This is why every consuming site could drop its `?? \"-\"`: KV owns the
98
94
  // placeholder. Losing this behaviour would silently reintroduce ten local
99
95
  // fallbacks across the fleet.
100
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
96
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
101
97
  title: "ref",
102
98
  kv: [{
103
99
  label: "Bureau douanier",
@@ -110,23 +106,23 @@ describe("MobileRowCard — kv slot", function () {
110
106
  value: null
111
107
  }]
112
108
  }));
113
- expect(_react2.screen.getByText("Bureau douanier")).toBeInTheDocument();
114
- expect(_react2.screen.getByText("Marchandise")).toBeInTheDocument();
115
- expect(_react2.screen.getByText("Devise")).toBeInTheDocument();
116
- expect(_react2.screen.getAllByText("—")).toHaveLength(3);
109
+ expect(_react.screen.getByText("Bureau douanier")).toBeInTheDocument();
110
+ expect(_react.screen.getByText("Marchandise")).toBeInTheDocument();
111
+ expect(_react.screen.getByText("Devise")).toBeInTheDocument();
112
+ expect(_react.screen.getAllByText("—")).toHaveLength(3);
117
113
  });
118
114
  test("a custom fallback overrides the em dash", function () {
119
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
115
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
120
116
  title: "ref",
121
117
  kv: [{
122
118
  label: "Banque",
123
119
  fallback: "Non assignée"
124
120
  }]
125
121
  }));
126
- expect(_react2.screen.getByText("Non assignée")).toBeInTheDocument();
122
+ expect(_react.screen.getByText("Non assignée")).toBeInTheDocument();
127
123
  });
128
124
  test("pairs with no label are DROPPED (KV would emit a dangling aria-labelledby)", function () {
129
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
125
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
130
126
  title: "ref",
131
127
  kv: [{
132
128
  label: "",
@@ -142,14 +138,14 @@ describe("MobileRowCard — kv slot", function () {
142
138
  value: "kept-value"
143
139
  }]
144
140
  }));
145
- expect(_react2.screen.queryByText("orphan-empty")).not.toBeInTheDocument();
146
- expect(_react2.screen.queryByText("orphan-missing")).not.toBeInTheDocument();
147
- expect(_react2.screen.getByText("kept-value")).toBeInTheDocument();
141
+ expect(_react.screen.queryByText("orphan-empty")).not.toBeInTheDocument();
142
+ expect(_react.screen.queryByText("orphan-missing")).not.toBeInTheDocument();
143
+ expect(_react.screen.getByText("kept-value")).toBeInTheDocument();
148
144
  });
149
145
  });
150
146
  describe("MobileRowCard — chips slot", function () {
151
147
  test("renders chip nodes and filters falsy entries", function () {
152
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
148
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
153
149
  title: "ref",
154
150
  chips: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
155
151
  children: "Approuv\xE9"
@@ -157,25 +153,25 @@ describe("MobileRowCard — chips slot", function () {
157
153
  children: "CO"
158
154
  }, "b")]
159
155
  }));
160
- expect(_react2.screen.getByText("Approuvé")).toBeInTheDocument();
161
- expect(_react2.screen.getByText("CO")).toBeInTheDocument();
156
+ expect(_react.screen.getByText("Approuvé")).toBeInTheDocument();
157
+ expect(_react.screen.getByText("CO")).toBeInTheDocument();
162
158
  });
163
159
  });
164
160
  describe("MobileRowCard — actions (kebab)", function () {
165
161
  test("kebab renders only when at least one non-divider action exists", function () {
166
- var _render2 = (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
162
+ var _render2 = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
167
163
  title: "ref",
168
164
  actions: []
169
165
  })),
170
166
  rerender = _render2.rerender;
171
- expect(_react2.screen.queryByRole("button")).not.toBeInTheDocument();
167
+ expect(_react.screen.queryByRole("button")).not.toBeInTheDocument();
172
168
  rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
173
169
  title: "ref",
174
170
  actions: [{
175
171
  divider: true
176
172
  }]
177
173
  }));
178
- expect(_react2.screen.queryByRole("button")).not.toBeInTheDocument();
174
+ expect(_react.screen.queryByRole("button")).not.toBeInTheDocument();
179
175
  rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
180
176
  title: "ref",
181
177
  actions: [{
@@ -184,7 +180,7 @@ describe("MobileRowCard — actions (kebab)", function () {
184
180
  }],
185
181
  actionsAriaLabel: "Actions pour 2025-IM-0042"
186
182
  }));
187
- expect(_react2.screen.getByRole("button", {
183
+ expect(_react.screen.getByRole("button", {
188
184
  name: "Actions pour 2025-IM-0042"
189
185
  })).toBeInTheDocument();
190
186
  });
@@ -213,7 +209,7 @@ describe("MobileRowCard — actions (kebab)", function () {
213
209
  describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
214
210
  test("leading does NOT stop click propagation to the card", function () {
215
211
  var onCardClick = jest.fn();
216
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
212
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
217
213
  onClick: onCardClick,
218
214
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
219
215
  title: "ref",
@@ -222,13 +218,13 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
222
218
  })
223
219
  })
224
220
  }));
225
- _react2.fireEvent.click(_react2.screen.getByText("star"));
221
+ _react.fireEvent.click(_react.screen.getByText("star"));
226
222
  expect(onCardClick).toHaveBeenCalledTimes(1);
227
223
  });
228
224
  test("trailing DOES stop click propagation to the card", function () {
229
225
  var onCardClick = jest.fn();
230
226
  var onAction = jest.fn();
231
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
227
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
232
228
  onClick: onCardClick,
233
229
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
234
230
  title: "ref",
@@ -238,7 +234,7 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
238
234
  })
239
235
  })
240
236
  }));
241
- _react2.fireEvent.click(_react2.screen.getByRole("button", {
237
+ _react.fireEvent.click(_react.screen.getByRole("button", {
242
238
  name: "Choisir"
243
239
  }));
244
240
  expect(onAction).toHaveBeenCalledTimes(1);
@@ -246,7 +242,7 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
246
242
  });
247
243
  test("trailing stops keydown propagation too (keyboard parity)", function () {
248
244
  var onCardKeyDown = jest.fn();
249
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
245
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
250
246
  onKeyDown: onCardKeyDown,
251
247
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
252
248
  title: "ref",
@@ -255,7 +251,7 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
255
251
  })
256
252
  })
257
253
  }));
258
- _react2.fireEvent.keyDown(_react2.screen.getByRole("button", {
254
+ _react.fireEvent.keyDown(_react.screen.getByRole("button", {
259
255
  name: "Choisir"
260
256
  }), {
261
257
  key: "Enter"
@@ -264,7 +260,7 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
264
260
  });
265
261
  test("opening the kebab does not fire the card click", function () {
266
262
  var onCardClick = jest.fn();
267
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
263
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
268
264
  onClick: onCardClick,
269
265
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
270
266
  title: "ref",
@@ -274,7 +270,7 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
274
270
  }]
275
271
  })
276
272
  }));
277
- _react2.fireEvent.click(_react2.screen.getByRole("button", {
273
+ _react.fireEvent.click(_react.screen.getByRole("button", {
278
274
  name: "Plus d'actions"
279
275
  }));
280
276
  expect(onCardClick).not.toHaveBeenCalled();
@@ -282,7 +278,7 @@ describe("MobileRowCard — propagation asymmetry (deliberate)", function () {
282
278
  });
283
279
  describe("MobileRowCard — header composition", function () {
284
280
  test("trailing and the kebab coexist, trailing first", function () {
285
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
281
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
286
282
  title: "ref",
287
283
  trailing: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
288
284
  children: "Visualiser"
@@ -293,10 +289,10 @@ describe("MobileRowCard — header composition", function () {
293
289
  }],
294
290
  actionsAriaLabel: "Autres actions"
295
291
  }));
296
- var visualiser = _react2.screen.getByRole("button", {
292
+ var visualiser = _react.screen.getByRole("button", {
297
293
  name: "Visualiser"
298
294
  });
299
- var kebab = _react2.screen.getByRole("button", {
295
+ var kebab = _react.screen.getByRole("button", {
300
296
  name: "Autres actions"
301
297
  });
302
298
  expect(visualiser).toBeInTheDocument();
@@ -308,30 +304,30 @@ describe("MobileRowCard — header composition", function () {
308
304
  test("a card with ONLY trailing still renders its header", function () {
309
305
  // Regression guard: hasHeader must include hasTrailing, otherwise a
310
306
  // title-less picker card would drop its action entirely.
311
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
307
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
312
308
  trailing: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
313
309
  children: "Choisir"
314
310
  })
315
311
  }));
316
- expect(_react2.screen.getByRole("button", {
312
+ expect(_react.screen.getByRole("button", {
317
313
  name: "Choisir"
318
314
  })).toBeInTheDocument();
319
315
  });
320
316
  test("a card with ONLY leading still renders its header", function () {
321
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
317
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {
322
318
  leading: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
323
319
  children: "star"
324
320
  })
325
321
  }));
326
- expect(_react2.screen.getByText("star")).toBeInTheDocument();
322
+ expect(_react.screen.getByText("star")).toBeInTheDocument();
327
323
  });
328
324
  test("no props renders no header and does not throw", function () {
329
325
  /* `render` not throwing IS the second half of this assertion. The button
330
326
  * check uses screen.queryByRole rather than container.querySelector
331
327
  * (testing-library/no-container + no-node-access), matching the idiom the
332
328
  * kebab test above already uses. */
333
- (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {}));
334
- expect(_react2.screen.queryByRole("button")).not.toBeInTheDocument();
329
+ (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileRowCard["default"], {}));
330
+ expect(_react.screen.queryByRole("button")).not.toBeInTheDocument();
335
331
  });
336
332
  });
337
333
  //# sourceMappingURL=MobileRowCard.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileRowCard.test.js","names":["require","React","_interopRequireWildcard","_react2","_MobileRowCard","_interopRequireDefault","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","describe","test","render","jsx","title","subtitle","meta","expect","screen","getByText","toBeInTheDocument","undefined","queryByText","not","_render","rerender","toHaveAttribute","children","queryByTitle","kv","label","value","getAllByText","toHaveLength","fallback","chips","_render2","actions","queryByRole","divider","onClick","actionsAriaLabel","getByRole","name","onCardClick","jest","fn","leading","fireEvent","click","toHaveBeenCalledTimes","onAction","trailing","toHaveBeenCalled","onCardKeyDown","onKeyDown","keyDown","visualiser","kebab","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","toBeTruthy"],"sources":["../../../src/lib/v2/__tests__/MobileRowCard.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen, fireEvent } from \"@testing-library/react\";\r\nimport MobileRowCard from \"../components/MobileRowCard\";\r\n\r\n/**\r\n * MobileRowCard — slot contract tests.\r\n *\r\n * WHY THIS FILE EXISTS\r\n * --------------------\r\n * §10.3 R-G.6 MUST — \"Snapshot Storybook + tests Jest/Testing-Library\" — was\r\n * unmet for THREE props added to this component across successive module\r\n * audits: `kv` and `leading` (ms-dfd-fe Area 5), then `trailing`\r\n * (ms-dfd-fe/ms-ti-fe A5-01). Each was shipped as \"additive, backward\r\n * compatible\", which is true and is not the same thing as verified. This\r\n * component is consumed by ten mobile-card sites across two certified modules,\r\n * so a silent change to any slot's behaviour regresses all of them at once.\r\n *\r\n * The PROPAGATION ASYMMETRY (see below) is the single most important thing\r\n * here. It is deliberate, it is counter-intuitive, and nothing but a test\r\n * stops a future reader from \"tidying\" it into consistency and breaking every\r\n * favourite-star and picker-button site in the fleet.\r\n *\r\n * NOT COVERED — and deliberately so: R-G.3 MUST (light + dark + compact +\r\n * responsive at 320/375/414) is a VISUAL contract. jsdom computes no layout,\r\n * so asserting it here would produce tests that pass while the cards are\r\n * broken on a phone — worse than no coverage, because it would look like\r\n * coverage. R-G.3 needs a browser (Storybook + visual regression) and remains\r\n * open for all three props.\r\n */\r\ndescribe(\"MobileRowCard — slot rendering\", () => {\r\n test(\"renders title, subtitle and meta, omitting lines with no content\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"2025-IM-0042\"\r\n subtitle=\"SOFRANE SA\"\r\n meta={[\"12/05/2026\", \"3 pièces\"]}\r\n />\r\n );\r\n\r\n expect(screen.getByText(\"2025-IM-0042\")).toBeInTheDocument();\r\n expect(screen.getByText(\"SOFRANE SA\")).toBeInTheDocument();\r\n // meta joins with \" · \" into a single node\r\n expect(screen.getByText(\"12/05/2026 · 3 pièces\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"meta drops null / empty entries rather than rendering stray separators\", () => {\r\n render(<MobileRowCard title=\"X\" meta={[\"Émise 01/01/2026\", null, \"\", undefined]} />);\r\n expect(screen.getByText(\"Émise 01/01/2026\")).toBeInTheDocument();\r\n expect(screen.queryByText(/·/)).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"a string title gets a native tooltip; a node title does not stringify\", () => {\r\n const { rerender } = render(<MobileRowCard title=\"Long reference\" />);\r\n expect(screen.getByText(\"Long reference\")).toHaveAttribute(\"title\", \"Long reference\");\r\n\r\n rerender(<MobileRowCard title={<span>Node title</span>} />);\r\n expect(screen.getByText(\"Node title\")).toBeInTheDocument();\r\n /* The regression guarded here: wrapping a node yielded title=\"[object\r\n * Object]\". Asserted with queryByTitle rather than `.closest(\"[title]\")`\r\n * so it stays a Testing-Library query (testing-library/no-node-access).\r\n * `/./` = \"no element carries ANY non-empty title\", which is a STRONGER\r\n * assertion than the ancestor walk it replaces: MobileRowCard sets a title\r\n * attribute in exactly two places (the title Box and the subtitle Box) and\r\n * only when the value is a string, so with a node title and no subtitle the\r\n * whole tree must be title-less. */\r\n expect(screen.queryByTitle(/./)).not.toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — kv slot\", () => {\r\n test(\"renders each pair as a KV label/value unit\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n kv={[\r\n { label: \"Catégorie\", value: \"CONTINGENT\" },\r\n { label: \"Importateur\", value: \"SOFRANE SA\" },\r\n ]}\r\n />\r\n );\r\n\r\n expect(screen.getByText(\"Catégorie\")).toBeInTheDocument();\r\n expect(screen.getByText(\"CONTINGENT\")).toBeInTheDocument();\r\n expect(screen.getByText(\"Importateur\")).toBeInTheDocument();\r\n expect(screen.getByText(\"SOFRANE SA\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"an empty value KEEPS the pair and shows KV's own em-dash placeholder\", () => {\r\n // This is why every consuming site could drop its `?? \\\"-\\\"`: KV owns the\r\n // placeholder. Losing this behaviour would silently reintroduce ten local\r\n // fallbacks across the fleet.\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n kv={[\r\n { label: \"Bureau douanier\", value: undefined },\r\n { label: \"Marchandise\", value: \"\" },\r\n { label: \"Devise\", value: null },\r\n ]}\r\n />\r\n );\r\n\r\n expect(screen.getByText(\"Bureau douanier\")).toBeInTheDocument();\r\n expect(screen.getByText(\"Marchandise\")).toBeInTheDocument();\r\n expect(screen.getByText(\"Devise\")).toBeInTheDocument();\r\n expect(screen.getAllByText(\"—\")).toHaveLength(3);\r\n });\r\n\r\n test(\"a custom fallback overrides the em dash\", () => {\r\n render(\r\n <MobileRowCard title=\"ref\" kv={[{ label: \"Banque\", fallback: \"Non assignée\" }]} />\r\n );\r\n expect(screen.getByText(\"Non assignée\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"pairs with no label are DROPPED (KV would emit a dangling aria-labelledby)\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n kv={[\r\n { label: \"\", value: \"orphan-empty\" },\r\n // `label` is required but its type (ReactNode) admits undefined, so\r\n // this is type-valid and exercises the runtime `!= null` guard.\r\n { label: undefined, value: \"orphan-missing\" },\r\n { label: \"Kept\", value: \"kept-value\" },\r\n ]}\r\n />\r\n );\r\n\r\n expect(screen.queryByText(\"orphan-empty\")).not.toBeInTheDocument();\r\n expect(screen.queryByText(\"orphan-missing\")).not.toBeInTheDocument();\r\n expect(screen.getByText(\"kept-value\")).toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — chips slot\", () => {\r\n test(\"renders chip nodes and filters falsy entries\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n chips={[<span key=\"a\">Approuvé</span>, null, false, <span key=\"b\">CO</span>]}\r\n />\r\n );\r\n expect(screen.getByText(\"Approuvé\")).toBeInTheDocument();\r\n expect(screen.getByText(\"CO\")).toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — actions (kebab)\", () => {\r\n test(\"kebab renders only when at least one non-divider action exists\", () => {\r\n const { rerender } = render(<MobileRowCard title=\"ref\" actions={[]} />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n\r\n rerender(<MobileRowCard title=\"ref\" actions={[{ divider: true }]} />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n\r\n rerender(\r\n <MobileRowCard\r\n title=\"ref\"\r\n actions={[{ label: \"Détail\", onClick: () => {} }]}\r\n actionsAriaLabel=\"Actions pour 2025-IM-0042\"\r\n />\r\n );\r\n expect(\r\n screen.getByRole(\"button\", { name: \"Actions pour 2025-IM-0042\" })\r\n ).toBeInTheDocument();\r\n });\r\n});\r\n\r\n/**\r\n * THE PROPAGATION CONTRACT — the reason this file matters most.\r\n *\r\n * DataGrid's mobile-card wrapper makes the whole card the click target\r\n * (role=button + onRowClick). Two slots therefore behave DIFFERENTLY on\r\n * purpose:\r\n *\r\n * leading — does NOT stop propagation. A decorative node (icon, avatar)\r\n * should still open the row like the rest of the card. Interactive\r\n * leading content is responsible for stopping propagation itself,\r\n * exactly as DataGrid's own FavoriteCell does. Get this wrong and\r\n * a tap both toggles the favourite star AND opens the drawer.\r\n *\r\n * trailing — DOES stop propagation (it shares the kebab's wrapper). Its\r\n * declared purpose is interactive actions, and a tap that both\r\n * fires the action and opens the row is the more damaging default.\r\n *\r\n * Making these two consistent — in either direction — is a breaking change for\r\n * the ten sites that depend on them.\r\n */\r\ndescribe(\"MobileRowCard — propagation asymmetry (deliberate)\", () => {\r\n test(\"leading does NOT stop click propagation to the card\", () => {\r\n const onCardClick = jest.fn();\r\n render(\r\n <div onClick={onCardClick}>\r\n <MobileRowCard title=\"ref\" leading={<span>star</span>} />\r\n </div>\r\n );\r\n\r\n fireEvent.click(screen.getByText(\"star\"));\r\n expect(onCardClick).toHaveBeenCalledTimes(1);\r\n });\r\n\r\n test(\"trailing DOES stop click propagation to the card\", () => {\r\n const onCardClick = jest.fn();\r\n const onAction = jest.fn();\r\n render(\r\n <div onClick={onCardClick}>\r\n <MobileRowCard\r\n title=\"ref\"\r\n trailing={<button onClick={onAction}>Choisir</button>}\r\n />\r\n </div>\r\n );\r\n\r\n fireEvent.click(screen.getByRole(\"button\", { name: \"Choisir\" }));\r\n expect(onAction).toHaveBeenCalledTimes(1);\r\n expect(onCardClick).not.toHaveBeenCalled();\r\n });\r\n\r\n test(\"trailing stops keydown propagation too (keyboard parity)\", () => {\r\n const onCardKeyDown = jest.fn();\r\n render(\r\n <div onKeyDown={onCardKeyDown}>\r\n <MobileRowCard title=\"ref\" trailing={<button>Choisir</button>} />\r\n </div>\r\n );\r\n\r\n fireEvent.keyDown(screen.getByRole(\"button\", { name: \"Choisir\" }), { key: \"Enter\" });\r\n expect(onCardKeyDown).not.toHaveBeenCalled();\r\n });\r\n\r\n test(\"opening the kebab does not fire the card click\", () => {\r\n const onCardClick = jest.fn();\r\n render(\r\n <div onClick={onCardClick}>\r\n <MobileRowCard title=\"ref\" actions={[{ label: \"Détail\", onClick: () => {} }]} />\r\n </div>\r\n );\r\n\r\n fireEvent.click(screen.getByRole(\"button\", { name: \"Plus d'actions\" }));\r\n expect(onCardClick).not.toHaveBeenCalled();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — header composition\", () => {\r\n test(\"trailing and the kebab coexist, trailing first\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n trailing={<button>Visualiser</button>}\r\n actions={[{ label: \"Supprimer\", onClick: () => {} }]}\r\n actionsAriaLabel=\"Autres actions\"\r\n />\r\n );\r\n\r\n const visualiser = screen.getByRole(\"button\", { name: \"Visualiser\" });\r\n const kebab = screen.getByRole(\"button\", { name: \"Autres actions\" });\r\n expect(visualiser).toBeInTheDocument();\r\n expect(kebab).toBeInTheDocument();\r\n\r\n // Document order: trailing precedes the kebab in the header end cluster.\r\n expect(\r\n visualiser.compareDocumentPosition(kebab) & Node.DOCUMENT_POSITION_FOLLOWING\r\n ).toBeTruthy();\r\n });\r\n\r\n test(\"a card with ONLY trailing still renders its header\", () => {\r\n // Regression guard: hasHeader must include hasTrailing, otherwise a\r\n // title-less picker card would drop its action entirely.\r\n render(<MobileRowCard trailing={<button>Choisir</button>} />);\r\n expect(screen.getByRole(\"button\", { name: \"Choisir\" })).toBeInTheDocument();\r\n });\r\n\r\n test(\"a card with ONLY leading still renders its header\", () => {\r\n render(<MobileRowCard leading={<span>star</span>} />);\r\n expect(screen.getByText(\"star\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"no props renders no header and does not throw\", () => {\r\n /* `render` not throwing IS the second half of this assertion. The button\r\n * check uses screen.queryByRole rather than container.querySelector\r\n * (testing-library/no-container + no-node-access), matching the idiom the\r\n * kebab test above already uses. */\r\n render(<MobileRowCard />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n });\r\n});\r\n"],"mappings":";;;AAAAA,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAK,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gB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AAjE,WAAA,CAAA0B,GAAA;QAAAc,QAAA,EAAQ;MAAO,CAAQ;IAAE,CAAE,CAAC,CAAC;IAC7DV,MAAM,CAACC,cAAM,CAACwB,SAAS,CAAC,QAAQ,EAAE;MAAEC,IAAI,EAAE;IAAU,CAAC,CAAC,CAAC,CAACvB,iBAAiB,CAAC,CAAC;EAC7E,CAAC,CAAC;EAEFT,IAAI,CAAC,mDAAmD,EAAE,YAAM;IAC9D,IAAAC,cAAM,eAAC,IAAAzB,WAAA,CAAA0B,GAAA,EAAC5B,cAAA,WAAa;MAAC8D,OAAO,eAAE,IAAA5D,WAAA,CAAA0B,GAAA;QAAAc,QAAA,EAAM;MAAI,CAAM;IAAE,CAAE,CAAC,CAAC;IACrDV,MAAM,CAACC,cAAM,CAACC,SAAS,CAAC,MAAM,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EACtD,CAAC,CAAC;EAEFT,IAAI,CAAC,+CAA+C,EAAE,YAAM;IAC1D;AACJ;AACA;AACA;IACI,IAAAC,cAAM,eAAC,IAAAzB,WAAA,CAAA0B,GAAA,EAAC5B,cAAA,WAAa,IAAE,CAAC,CAAC;IACzBgC,MAAM,CAACC,cAAM,CAACoB,WAAW,CAAC,QAAQ,CAAC,CAAC,CAACf,GAAG,CAACH,iBAAiB,CAAC,CAAC;EAC9D,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MobileRowCard.test.js","names":["require","_react","_MobileRowCard","_interopRequireDefault","_jsxRuntime","obj","__esModule","describe","test","render","jsx","title","subtitle","meta","expect","screen","getByText","toBeInTheDocument","undefined","queryByText","not","_render","rerender","toHaveAttribute","children","queryByTitle","kv","label","value","getAllByText","toHaveLength","fallback","chips","_render2","actions","queryByRole","divider","onClick","actionsAriaLabel","getByRole","name","onCardClick","jest","fn","leading","fireEvent","click","toHaveBeenCalledTimes","onAction","trailing","toHaveBeenCalled","onCardKeyDown","onKeyDown","keyDown","key","visualiser","kebab","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","toBeTruthy"],"sources":["../../../src/lib/v2/__tests__/MobileRowCard.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport { render, screen, fireEvent } from \"@testing-library/react\";\r\nimport MobileRowCard from \"../components/MobileRowCard\";\r\n\r\n/**\r\n * MobileRowCard — slot contract tests.\r\n *\r\n * WHY THIS FILE EXISTS\r\n * --------------------\r\n * §10.3 R-G.6 MUST — \"Snapshot Storybook + tests Jest/Testing-Library\" — was\r\n * unmet for THREE props added to this component across successive module\r\n * audits: `kv` and `leading` (ms-dfd-fe Area 5), then `trailing`\r\n * (ms-dfd-fe/ms-ti-fe A5-01). Each was shipped as \"additive, backward\r\n * compatible\", which is true and is not the same thing as verified. This\r\n * component is consumed by ten mobile-card sites across two certified modules,\r\n * so a silent change to any slot's behaviour regresses all of them at once.\r\n *\r\n * The PROPAGATION ASYMMETRY (see below) is the single most important thing\r\n * here. It is deliberate, it is counter-intuitive, and nothing but a test\r\n * stops a future reader from \"tidying\" it into consistency and breaking every\r\n * favourite-star and picker-button site in the fleet.\r\n *\r\n * NOT COVERED — and deliberately so: R-G.3 MUST (light + dark + compact +\r\n * responsive at 320/375/414) is a VISUAL contract. jsdom computes no layout,\r\n * so asserting it here would produce tests that pass while the cards are\r\n * broken on a phone — worse than no coverage, because it would look like\r\n * coverage. R-G.3 needs a browser (Storybook + visual regression) and remains\r\n * open for all three props.\r\n */\r\ndescribe(\"MobileRowCard — slot rendering\", () => {\r\n test(\"renders title, subtitle and meta, omitting lines with no content\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"2025-IM-0042\"\r\n subtitle=\"SOFRANE SA\"\r\n meta={[\"12/05/2026\", \"3 pièces\"]}\r\n />\r\n );\r\n\r\n expect(screen.getByText(\"2025-IM-0042\")).toBeInTheDocument();\r\n expect(screen.getByText(\"SOFRANE SA\")).toBeInTheDocument();\r\n // meta joins with \" · \" into a single node\r\n expect(screen.getByText(\"12/05/2026 · 3 pièces\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"meta drops null / empty entries rather than rendering stray separators\", () => {\r\n render(<MobileRowCard title=\"X\" meta={[\"Émise 01/01/2026\", null, \"\", undefined]} />);\r\n expect(screen.getByText(\"Émise 01/01/2026\")).toBeInTheDocument();\r\n expect(screen.queryByText(/·/)).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"a string title gets a native tooltip; a node title does not stringify\", () => {\r\n const { rerender } = render(<MobileRowCard title=\"Long reference\" />);\r\n expect(screen.getByText(\"Long reference\")).toHaveAttribute(\"title\", \"Long reference\");\r\n\r\n rerender(<MobileRowCard title={<span>Node title</span>} />);\r\n expect(screen.getByText(\"Node title\")).toBeInTheDocument();\r\n /* The regression guarded here: wrapping a node yielded title=\"[object\r\n * Object]\". Asserted with queryByTitle rather than `.closest(\"[title]\")`\r\n * so it stays a Testing-Library query (testing-library/no-node-access).\r\n * `/./` = \"no element carries ANY non-empty title\", which is a STRONGER\r\n * assertion than the ancestor walk it replaces: MobileRowCard sets a title\r\n * attribute in exactly two places (the title Box and the subtitle Box) and\r\n * only when the value is a string, so with a node title and no subtitle the\r\n * whole tree must be title-less. */\r\n expect(screen.queryByTitle(/./)).not.toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — kv slot\", () => {\r\n test(\"renders each pair as a KV label/value unit\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n kv={[\r\n { label: \"Catégorie\", value: \"CONTINGENT\" },\r\n { label: \"Importateur\", value: \"SOFRANE SA\" },\r\n ]}\r\n />\r\n );\r\n\r\n expect(screen.getByText(\"Catégorie\")).toBeInTheDocument();\r\n expect(screen.getByText(\"CONTINGENT\")).toBeInTheDocument();\r\n expect(screen.getByText(\"Importateur\")).toBeInTheDocument();\r\n expect(screen.getByText(\"SOFRANE SA\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"an empty value KEEPS the pair and shows KV's own em-dash placeholder\", () => {\r\n // This is why every consuming site could drop its `?? \\\"-\\\"`: KV owns the\r\n // placeholder. Losing this behaviour would silently reintroduce ten local\r\n // fallbacks across the fleet.\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n kv={[\r\n { label: \"Bureau douanier\", value: undefined },\r\n { label: \"Marchandise\", value: \"\" },\r\n { label: \"Devise\", value: null },\r\n ]}\r\n />\r\n );\r\n\r\n expect(screen.getByText(\"Bureau douanier\")).toBeInTheDocument();\r\n expect(screen.getByText(\"Marchandise\")).toBeInTheDocument();\r\n expect(screen.getByText(\"Devise\")).toBeInTheDocument();\r\n expect(screen.getAllByText(\"—\")).toHaveLength(3);\r\n });\r\n\r\n test(\"a custom fallback overrides the em dash\", () => {\r\n render(\r\n <MobileRowCard title=\"ref\" kv={[{ label: \"Banque\", fallback: \"Non assignée\" }]} />\r\n );\r\n expect(screen.getByText(\"Non assignée\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"pairs with no label are DROPPED (KV would emit a dangling aria-labelledby)\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n kv={[\r\n { label: \"\", value: \"orphan-empty\" },\r\n // `label` is required but its type (ReactNode) admits undefined, so\r\n // this is type-valid and exercises the runtime `!= null` guard.\r\n { label: undefined, value: \"orphan-missing\" },\r\n { label: \"Kept\", value: \"kept-value\" },\r\n ]}\r\n />\r\n );\r\n\r\n expect(screen.queryByText(\"orphan-empty\")).not.toBeInTheDocument();\r\n expect(screen.queryByText(\"orphan-missing\")).not.toBeInTheDocument();\r\n expect(screen.getByText(\"kept-value\")).toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — chips slot\", () => {\r\n test(\"renders chip nodes and filters falsy entries\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n chips={[<span key=\"a\">Approuvé</span>, null, false, <span key=\"b\">CO</span>]}\r\n />\r\n );\r\n expect(screen.getByText(\"Approuvé\")).toBeInTheDocument();\r\n expect(screen.getByText(\"CO\")).toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — actions (kebab)\", () => {\r\n test(\"kebab renders only when at least one non-divider action exists\", () => {\r\n const { rerender } = render(<MobileRowCard title=\"ref\" actions={[]} />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n\r\n rerender(<MobileRowCard title=\"ref\" actions={[{ divider: true }]} />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n\r\n rerender(\r\n <MobileRowCard\r\n title=\"ref\"\r\n actions={[{ label: \"Détail\", onClick: () => {} }]}\r\n actionsAriaLabel=\"Actions pour 2025-IM-0042\"\r\n />\r\n );\r\n expect(\r\n screen.getByRole(\"button\", { name: \"Actions pour 2025-IM-0042\" })\r\n ).toBeInTheDocument();\r\n });\r\n});\r\n\r\n/**\r\n * THE PROPAGATION CONTRACT — the reason this file matters most.\r\n *\r\n * DataGrid's mobile-card wrapper makes the whole card the click target\r\n * (role=button + onRowClick). Two slots therefore behave DIFFERENTLY on\r\n * purpose:\r\n *\r\n * leading — does NOT stop propagation. A decorative node (icon, avatar)\r\n * should still open the row like the rest of the card. Interactive\r\n * leading content is responsible for stopping propagation itself,\r\n * exactly as DataGrid's own FavoriteCell does. Get this wrong and\r\n * a tap both toggles the favourite star AND opens the drawer.\r\n *\r\n * trailing — DOES stop propagation (it shares the kebab's wrapper). Its\r\n * declared purpose is interactive actions, and a tap that both\r\n * fires the action and opens the row is the more damaging default.\r\n *\r\n * Making these two consistent — in either direction — is a breaking change for\r\n * the ten sites that depend on them.\r\n */\r\ndescribe(\"MobileRowCard — propagation asymmetry (deliberate)\", () => {\r\n test(\"leading does NOT stop click propagation to the card\", () => {\r\n const onCardClick = jest.fn();\r\n render(\r\n <div onClick={onCardClick}>\r\n <MobileRowCard title=\"ref\" leading={<span>star</span>} />\r\n </div>\r\n );\r\n\r\n fireEvent.click(screen.getByText(\"star\"));\r\n expect(onCardClick).toHaveBeenCalledTimes(1);\r\n });\r\n\r\n test(\"trailing DOES stop click propagation to the card\", () => {\r\n const onCardClick = jest.fn();\r\n const onAction = jest.fn();\r\n render(\r\n <div onClick={onCardClick}>\r\n <MobileRowCard\r\n title=\"ref\"\r\n trailing={<button onClick={onAction}>Choisir</button>}\r\n />\r\n </div>\r\n );\r\n\r\n fireEvent.click(screen.getByRole(\"button\", { name: \"Choisir\" }));\r\n expect(onAction).toHaveBeenCalledTimes(1);\r\n expect(onCardClick).not.toHaveBeenCalled();\r\n });\r\n\r\n test(\"trailing stops keydown propagation too (keyboard parity)\", () => {\r\n const onCardKeyDown = jest.fn();\r\n render(\r\n <div onKeyDown={onCardKeyDown}>\r\n <MobileRowCard title=\"ref\" trailing={<button>Choisir</button>} />\r\n </div>\r\n );\r\n\r\n fireEvent.keyDown(screen.getByRole(\"button\", { name: \"Choisir\" }), { key: \"Enter\" });\r\n expect(onCardKeyDown).not.toHaveBeenCalled();\r\n });\r\n\r\n test(\"opening the kebab does not fire the card click\", () => {\r\n const onCardClick = jest.fn();\r\n render(\r\n <div onClick={onCardClick}>\r\n <MobileRowCard title=\"ref\" actions={[{ label: \"Détail\", onClick: () => {} }]} />\r\n </div>\r\n );\r\n\r\n fireEvent.click(screen.getByRole(\"button\", { name: \"Plus d'actions\" }));\r\n expect(onCardClick).not.toHaveBeenCalled();\r\n });\r\n});\r\n\r\ndescribe(\"MobileRowCard — header composition\", () => {\r\n test(\"trailing and the kebab coexist, trailing first\", () => {\r\n render(\r\n <MobileRowCard\r\n title=\"ref\"\r\n trailing={<button>Visualiser</button>}\r\n actions={[{ label: \"Supprimer\", onClick: () => {} }]}\r\n actionsAriaLabel=\"Autres actions\"\r\n />\r\n );\r\n\r\n const visualiser = screen.getByRole(\"button\", { name: \"Visualiser\" });\r\n const kebab = screen.getByRole(\"button\", { name: \"Autres actions\" });\r\n expect(visualiser).toBeInTheDocument();\r\n expect(kebab).toBeInTheDocument();\r\n\r\n // Document order: trailing precedes the kebab in the header end cluster.\r\n expect(\r\n visualiser.compareDocumentPosition(kebab) & Node.DOCUMENT_POSITION_FOLLOWING\r\n ).toBeTruthy();\r\n });\r\n\r\n test(\"a card with ONLY trailing still renders its header\", () => {\r\n // Regression guard: hasHeader must include hasTrailing, otherwise a\r\n // title-less picker card would drop its action entirely.\r\n render(<MobileRowCard trailing={<button>Choisir</button>} />);\r\n expect(screen.getByRole(\"button\", { name: \"Choisir\" })).toBeInTheDocument();\r\n });\r\n\r\n test(\"a card with ONLY leading still renders its header\", () => {\r\n render(<MobileRowCard leading={<span>star</span>} />);\r\n expect(screen.getByText(\"star\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"no props renders no header and does not throw\", () => {\r\n /* `render` not throwing IS the second half of this assertion. The button\r\n * check uses screen.queryByRole rather than container.querySelector\r\n * (testing-library/no-container + no-node-access), matching the idiom the\r\n * kebab test above already uses. */\r\n render(<MobileRowCard />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n });\r\n});\r\n"],"mappings":";;AAAAA,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAG,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAE,QAAQ,CAAC,gCAAgC,EAAE,YAAM;EAC/CC,IAAI,CAAC,kEAAkE,EAAE,YAAM;IAC7E,IAAAC,aAAM,eACJ,IAAAL,WAAA,CAAAM,GAAA,EAACR,cAAA,WAAa;MACZS,KAAK,EAAC,cAAc;MACpBC,QAAQ,EAAC,YAAY;MACrBC,IAAI,EAAE,CAAC,YAAY,EAAE,UAAU;IAAE,CAClC,CACH,CAAC;IAEDC,MAAM,CAACC,aAAM,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;IAAE,CAAE,CAAC,CAAC;IACrDV,MAAM,CAACC,aAAM,CAACC,SAAS,CAAC,MAAM,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EACtD,CAAC,CAAC;EAEFT,IAAI,CAAC,+CAA+C,EAAE,YAAM;IAC1D;AACJ;AACA;AACA;IACI,IAAAC,aAAM,eAAC,IAAAL,WAAA,CAAAM,GAAA,EAACR,cAAA,WAAa,IAAE,CAAC,CAAC;IACzBY,MAAM,CAACC,aAAM,CAACoB,WAAW,CAAC,QAAQ,CAAC,CAAC,CAACf,GAAG,CAACH,iBAAiB,CAAC,CAAC;EAC9D,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionErrorBoundary.test.js","names":["require","React","_interopRequireWildcard","_react2","_SectionErrorBoundary","_interopRequireDefault","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","Array","from","test","len","length","arr2","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","isArray","Boom","_ref","_ref$shouldThrow","shouldThrow","Error","jsx","children","consoleErrorSpy","beforeEach","jest","spyOn","console","mockImplementation","afterEach","mockRestore","describe","render","title","expect","screen","getByText","toBeInTheDocument","queryByRole","not","jsxs","getByRole","toHaveTextContent","previous","process","env","holder","Flaky","fireEvent","click","retryLabel","onError","fn","toHaveBeenCalledTimes","_ref2","mock","calls","_ref3","info","toBeInstanceOf","message","toMatch","toHaveProperty","toThrow","onEscape","secondaryAction","label","onClick","escape","logged","some","args","a","includes","toBe"],"sources":["../../../src/lib/v2/__tests__/SectionErrorBoundary.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen, fireEvent } from \"@testing-library/react\";\r\nimport SectionErrorBoundary from \"../components/SectionErrorBoundary\";\r\n\r\n/**\r\n * SectionErrorBoundary — behaviour tests.\r\n *\r\n * WHY THIS FILE MATTERS MORE THAN MOST\r\n * ------------------------------------\r\n * §10.3 R-G.6 MUST, but the real reason is that this is the one component in the\r\n * library whose ENTIRE contract is a failure path. Every other component can be\r\n * eyeballed in Storybook; this one only does its job when something throws, which\r\n * nobody exercises by hand. And its failure mode is total: if the boundary does\r\n * not catch, React unmounts the whole tree and the user gets a blank screen\r\n * (ISO/IEC 25010 § Reliability — fault tolerance).\r\n *\r\n * jsdom is the right tool here, unusually: catching, re-mounting, logging and\r\n * conditional detail are all logic, not layout.\r\n *\r\n * NOTE ON CONSOLE NOISE — React logs caught errors to console.error itself, on\r\n * top of the boundary's own log. Both are silenced per-test rather than globally\r\n * so a genuine unexpected console.error still surfaces in the other suites.\r\n */\r\n\r\n/** A component that throws on render, controlled by a prop. */\r\nfunction Boom({ shouldThrow = true }: { shouldThrow?: boolean }) {\r\n if (shouldThrow) throw new Error(\"payload inattendu: articles.map n'est pas une fonction\");\r\n return <div>contenu rétabli</div>;\r\n}\r\n\r\nlet consoleErrorSpy: jest.SpyInstance;\r\n\r\nbeforeEach(() => {\r\n consoleErrorSpy = jest.spyOn(console, \"error\").mockImplementation(() => {});\r\n});\r\n\r\nafterEach(() => {\r\n consoleErrorSpy.mockRestore();\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — containment\", () => {\r\n test(\"renders children untouched when nothing throws\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <div>contenu normal</div>\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByText(\"contenu normal\")).toBeInTheDocument();\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"catches a render exception and keeps its SIBLINGS mounted\", () => {\r\n /* THE contract. The assertion that matters is not that the banner appears —\r\n * it is that `sibling` is still in the document. Without a boundary React\r\n * unmounts the entire tree and BOTH would be gone: that is the blank screen\r\n * this component exists to prevent. */\r\n render(\r\n <div>\r\n <div>sibling</div>\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n </div>\r\n );\r\n\r\n expect(screen.getByText(\"sibling\")).toBeInTheDocument();\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"names the failing section so the user knows WHAT broke\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Marchandises\");\r\n });\r\n\r\n test(\"falls back to a generic label when no title is supplied\", () => {\r\n render(\r\n <SectionErrorBoundary>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Section\");\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — user-facing copy (§09.3)\", () => {\r\n test(\"shows French recovery copy, never a raw exception message\", () => {\r\n /* Charter §09.3 forbids exposing technical detail to the user, and a raw JS\r\n * exception is worse than the \"Erreur HTTP 422\" the charter uses as its DON'T\r\n * example. The reference implementation this was promoted from rendered\r\n * error.message straight into the banner body; this asserts we do not.\r\n *\r\n * NODE_ENV is \"test\" here, not \"production\", so the dev detail block DOES\r\n * render — which is why this test targets the recovery sentence rather than\r\n * asserting the absence of the message. The production-only behaviour is\r\n * asserted separately below. */\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n /Cette section n'a pas pu s'afficher/\r\n );\r\n });\r\n\r\n test(\"suppresses the technical detail in production\", () => {\r\n const previous = process.env[\"NODE_ENV\"];\r\n /* Bracket access throughout, matching the component: `process.env` is an index\r\n * signature and `noPropertyAccessFromIndexSignature` is mandatory. Tests are\r\n * outside tsconfig.build.json's scope so dot access would have compiled here —\r\n * two conventions in neighbouring files is the drift this audit exists to stop.\r\n *\r\n * Assigned rather than replaced wholesale: other suites read NODE_ENV, and the\r\n * finally block restores it even if the assertion throws. */\r\n (process.env as Record<string, string>)[\"NODE_ENV\"] = \"production\";\r\n try {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n /Cette section n'a pas pu s'afficher/\r\n );\r\n expect(screen.getByRole(\"alert\")).not.toHaveTextContent(/articles\\.map/);\r\n } finally {\r\n (process.env as Record<string, string>)[\"NODE_ENV\"] = previous ?? \"test\";\r\n }\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — retry REMOUNTS\", () => {\r\n test(\"retry clears the error and re-renders the subtree\", () => {\r\n /* The re-key on `attempt` is what makes this work. Without it React reuses\r\n * the instance that threw and retry fails identically — a retry button that\r\n * cannot succeed is worse than no retry button. `shouldThrow` is read from a\r\n * mutable holder so the same element throws first and succeeds second,\r\n * exactly as a transient payload problem would. */\r\n const holder = { shouldThrow: true };\r\n function Flaky() {\r\n return <Boom shouldThrow={holder.shouldThrow} />;\r\n }\r\n\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Flaky />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n\r\n holder.shouldThrow = false;\r\n fireEvent.click(screen.getByRole(\"button\", { name: /Réessayer/ }));\r\n\r\n expect(screen.getByText(\"contenu rétabli\")).toBeInTheDocument();\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"a custom retryLabel is used on the button and in the copy\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" retryLabel=\"Recharger\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"button\", { name: /Recharger/ })).toBeInTheDocument();\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(/Recharger/);\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — reporting and second exit\", () => {\r\n test(\"calls onError with the error and the component info\", () => {\r\n /* console.error is invisible in production, so without this hook a boundary\r\n * silently swallows the only signal an operator would ever get. */\r\n const onError = jest.fn();\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" onError={onError}>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n\r\n expect(onError).toHaveBeenCalledTimes(1);\r\n const [err, info] = onError.mock.calls[0] as [Error, React.ErrorInfo];\r\n expect(err).toBeInstanceOf(Error);\r\n expect(err.message).toMatch(/articles\\.map/);\r\n expect(info).toHaveProperty(\"componentStack\");\r\n });\r\n\r\n test(\"a throwing onError does not take the boundary down with it\", () => {\r\n /* Guard on the guard. A reporter that throws must not defeat the component\r\n * whose entire purpose is stopping one failure from causing another. */\r\n const onError = jest.fn(() => {\r\n throw new Error(\"APM indisponible\");\r\n });\r\n\r\n expect(() =>\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" onError={onError}>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n )\r\n ).not.toThrow();\r\n\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"renders the optional secondary exit when supplied\", () => {\r\n /* Only possible since Banner gained secondaryAction (gap G-19). The reference\r\n * implementation offered no way out when retrying could not help. */\r\n const onEscape = jest.fn();\r\n render(\r\n <SectionErrorBoundary\r\n title=\"Marchandises\"\r\n secondaryAction={{ label: \"Retour à la liste\", onClick: onEscape }}\r\n >\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n\r\n const escape = screen.getByRole(\"button\", { name: /Retour à la liste/ });\r\n fireEvent.click(escape);\r\n expect(onEscape).toHaveBeenCalledTimes(1);\r\n });\r\n\r\n test(\"logs the section title and the component stack\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n /* Asserted loosely — the point is that an operator grepping logs can find\r\n * WHICH section failed, not the exact format of the line. */\r\n const logged = consoleErrorSpy.mock.calls.some((args) =>\r\n args.some((a) => typeof a === \"string\" && a.includes(\"Marchandises\"))\r\n );\r\n expect(logged).toBe(true);\r\n });\r\n});\r\n"],"mappings":";;;AAAAA,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAsE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAK,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAK,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAO,OAAA,CAAAP,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAQ,KAAA,GAAAN,wBAAA,CAAAC,WAAA,OAAAK,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IA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;MAAA,EAAC;IAAA,CACvE,CAAC;IACDvC,MAAM,CAACmC,MAAM,CAAC,CAACK,IAAI,CAAC,IAAI,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"SectionErrorBoundary.test.js","names":["require","React","_interopRequireWildcard","_react2","_SectionErrorBoundary","_interopRequireDefault","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","Array","from","test","len","length","arr2","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","isArray","Boom","_ref","_ref$shouldThrow","shouldThrow","Error","jsx","children","consoleErrorSpy","beforeEach","jest","spyOn","console","mockImplementation","afterEach","mockRestore","describe","render","title","expect","screen","getByText","toBeInTheDocument","queryByRole","not","jsxs","getByRole","toHaveTextContent","previous","process","env","holder","Flaky","fireEvent","click","retryLabel","onError","fn","toHaveBeenCalledTimes","_ref2","mock","calls","_ref3","info","toBeInstanceOf","message","toMatch","toHaveProperty","toThrow","onEscape","secondaryAction","label","onClick","escape","logged","some","args","a","includes","toBe"],"sources":["../../../src/lib/v2/__tests__/SectionErrorBoundary.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen, fireEvent } from \"@testing-library/react\";\r\nimport SectionErrorBoundary from \"../components/SectionErrorBoundary\";\r\n\r\n/**\r\n * SectionErrorBoundary — behaviour tests.\r\n *\r\n * WHY THIS FILE MATTERS MORE THAN MOST\r\n * ------------------------------------\r\n * §10.3 R-G.6 MUST, but the real reason is that this is the one component in the\r\n * library whose ENTIRE contract is a failure path. Every other component can be\r\n * eyeballed in Storybook; this one only does its job when something throws, which\r\n * nobody exercises by hand. And its failure mode is total: if the boundary does\r\n * not catch, React unmounts the whole tree and the user gets a blank screen\r\n * (ISO/IEC 25010 § Reliability — fault tolerance).\r\n *\r\n * jsdom is the right tool here, unusually: catching, re-mounting, logging and\r\n * conditional detail are all logic, not layout.\r\n *\r\n * NOTE ON CONSOLE NOISE — React logs caught errors to console.error itself, on\r\n * top of the boundary's own log. Both are silenced per-test rather than globally\r\n * so a genuine unexpected console.error still surfaces in the other suites.\r\n */\r\n\r\n/** A component that throws on render, controlled by a prop. */\r\nfunction Boom({ shouldThrow = true }: { shouldThrow?: boolean }) {\r\n if (shouldThrow) throw new Error(\"payload inattendu: articles.map n'est pas une fonction\");\r\n return <div>contenu rétabli</div>;\r\n}\r\n\r\nlet consoleErrorSpy: jest.SpyInstance;\r\n\r\nbeforeEach(() => {\r\n consoleErrorSpy = jest.spyOn(console, \"error\").mockImplementation(() => {});\r\n});\r\n\r\nafterEach(() => {\r\n consoleErrorSpy.mockRestore();\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — containment\", () => {\r\n test(\"renders children untouched when nothing throws\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <div>contenu normal</div>\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByText(\"contenu normal\")).toBeInTheDocument();\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"catches a render exception and keeps its SIBLINGS mounted\", () => {\r\n /* THE contract. The assertion that matters is not that the banner appears —\r\n * it is that `sibling` is still in the document. Without a boundary React\r\n * unmounts the entire tree and BOTH would be gone: that is the blank screen\r\n * this component exists to prevent. */\r\n render(\r\n <div>\r\n <div>sibling</div>\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n </div>\r\n );\r\n\r\n expect(screen.getByText(\"sibling\")).toBeInTheDocument();\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"names the failing section so the user knows WHAT broke\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Marchandises\");\r\n });\r\n\r\n test(\"falls back to a generic label when no title is supplied\", () => {\r\n render(\r\n <SectionErrorBoundary>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Section\");\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — user-facing copy (§09.3)\", () => {\r\n test(\"shows French recovery copy, never a raw exception message\", () => {\r\n /* Charter §09.3 forbids exposing technical detail to the user, and a raw JS\r\n * exception is worse than the \"Erreur HTTP 422\" the charter uses as its DON'T\r\n * example. The reference implementation this was promoted from rendered\r\n * error.message straight into the banner body; this asserts we do not.\r\n *\r\n * NODE_ENV is \"test\" here, not \"production\", so the dev detail block DOES\r\n * render — which is why this test targets the recovery sentence rather than\r\n * asserting the absence of the message. The production-only behaviour is\r\n * asserted separately below. */\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n /Cette section n'a pas pu s'afficher/\r\n );\r\n });\r\n\r\n test(\"suppresses the technical detail in production\", () => {\r\n const previous = process.env[\"NODE_ENV\"];\r\n /* Bracket access throughout, matching the component: `process.env` is an index\r\n * signature and `noPropertyAccessFromIndexSignature` is mandatory. Tests are\r\n * outside tsconfig.build.json's scope so dot access would have compiled here —\r\n * two conventions in neighbouring files is the drift this audit exists to stop.\r\n *\r\n * Assigned rather than replaced wholesale: other suites read NODE_ENV, and the\r\n * finally block restores it even if the assertion throws. */\r\n (process.env as Record<string, string>)[\"NODE_ENV\"] = \"production\";\r\n try {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n /Cette section n'a pas pu s'afficher/\r\n );\r\n expect(screen.getByRole(\"alert\")).not.toHaveTextContent(/articles\\.map/);\r\n } finally {\r\n (process.env as Record<string, string>)[\"NODE_ENV\"] = previous ?? \"test\";\r\n }\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — retry REMOUNTS\", () => {\r\n test(\"retry clears the error and re-renders the subtree\", () => {\r\n /* The re-key on `attempt` is what makes this work. Without it React reuses\r\n * the instance that threw and retry fails identically — a retry button that\r\n * cannot succeed is worse than no retry button. `shouldThrow` is read from a\r\n * mutable holder so the same element throws first and succeeds second,\r\n * exactly as a transient payload problem would. */\r\n const holder = { shouldThrow: true };\r\n function Flaky() {\r\n return <Boom shouldThrow={holder.shouldThrow} />;\r\n }\r\n\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Flaky />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n\r\n holder.shouldThrow = false;\r\n fireEvent.click(screen.getByRole(\"button\", { name: /Réessayer/ }));\r\n\r\n expect(screen.getByText(\"contenu rétabli\")).toBeInTheDocument();\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"a custom retryLabel is used on the button and in the copy\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" retryLabel=\"Recharger\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"button\", { name: /Recharger/ })).toBeInTheDocument();\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(/Recharger/);\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — reporting and second exit\", () => {\r\n test(\"calls onError with the error and the component info\", () => {\r\n /* console.error is invisible in production, so without this hook a boundary\r\n * silently swallows the only signal an operator would ever get. */\r\n const onError = jest.fn();\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" onError={onError}>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n\r\n expect(onError).toHaveBeenCalledTimes(1);\r\n const [err, info] = onError.mock.calls[0] as [Error, React.ErrorInfo];\r\n expect(err).toBeInstanceOf(Error);\r\n expect(err.message).toMatch(/articles\\.map/);\r\n expect(info).toHaveProperty(\"componentStack\");\r\n });\r\n\r\n test(\"a throwing onError does not take the boundary down with it\", () => {\r\n /* Guard on the guard. A reporter that throws must not defeat the component\r\n * whose entire purpose is stopping one failure from causing another. */\r\n const onError = jest.fn(() => {\r\n throw new Error(\"APM indisponible\");\r\n });\r\n\r\n expect(() =>\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" onError={onError}>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n )\r\n ).not.toThrow();\r\n\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"renders the optional secondary exit when supplied\", () => {\r\n /* Only possible since Banner gained secondaryAction (gap G-19). The reference\r\n * implementation offered no way out when retrying could not help. */\r\n const onEscape = jest.fn();\r\n render(\r\n <SectionErrorBoundary\r\n title=\"Marchandises\"\r\n secondaryAction={{ label: \"Retour à la liste\", onClick: onEscape }}\r\n >\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n\r\n const escape = screen.getByRole(\"button\", { name: /Retour à la liste/ });\r\n fireEvent.click(escape);\r\n expect(onEscape).toHaveBeenCalledTimes(1);\r\n });\r\n\r\n test(\"logs the section title and the component stack\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n /* Asserted loosely — the point is that an operator grepping logs can find\r\n * WHICH section failed, not the exact format of the line. */\r\n const logged = consoleErrorSpy.mock.calls.some((args) =>\r\n args.some((a: unknown) => typeof a === \"string\" && a.includes(\"Marchandises\"))\r\n );\r\n expect(logged).toBe(true);\r\n });\r\n});\r\n"],"mappings":";;;AAAAA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