vueless 1.3.1-beta.1 → 1.3.2-beta.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.
Files changed (78) hide show
  1. package/icons/internal/progress_activity.svg +1 -0
  2. package/package.json +1 -1
  3. package/ui.container-accordion/tests/UAccordion.test.ts +6 -9
  4. package/ui.container-accordion-item/tests/UAccordionItem.test.ts +18 -41
  5. package/ui.container-card/config.ts +2 -0
  6. package/ui.container-card/tests/UCard.test.ts +14 -31
  7. package/ui.container-card/types.ts +1 -1
  8. package/ui.container-col/tests/UCol.test.ts +11 -25
  9. package/ui.container-drawer/config.ts +1 -0
  10. package/ui.container-drawer/types.ts +1 -1
  11. package/ui.container-group/tests/UGroup.test.ts +12 -26
  12. package/ui.container-groups/tests/UGroups.test.ts +4 -11
  13. package/ui.container-modal/UModal.vue +1 -1
  14. package/ui.container-modal/config.ts +2 -1
  15. package/ui.container-modal/types.ts +1 -1
  16. package/ui.container-modal-confirm/UModalConfirm.vue +2 -2
  17. package/ui.container-modal-confirm/tests/UModalConfirm.test.ts +28 -57
  18. package/ui.container-modal-confirm/types.ts +1 -1
  19. package/ui.container-page/config.ts +2 -0
  20. package/ui.container-page/tests/UPage.test.ts +18 -38
  21. package/ui.container-page/types.ts +1 -1
  22. package/ui.container-row/tests/URow.test.ts +11 -25
  23. package/ui.form-calendar/config.ts +0 -1
  24. package/ui.form-checkbox/config.ts +14 -15
  25. package/ui.form-checkbox/storybook/docs.mdx +0 -16
  26. package/ui.form-checkbox/storybook/optionKeys.mdx +17 -0
  27. package/ui.form-checkbox/storybook/stories.ts +1 -3
  28. package/ui.form-checkbox-group/storybook/docs.mdx +2 -2
  29. package/ui.form-checkbox-multi-state/storybook/docs.mdx +3 -0
  30. package/ui.loader/ULoader.vue +10 -2
  31. package/ui.loader/config.ts +14 -1
  32. package/ui.loader/storybook/stories.ts +4 -1
  33. package/ui.loader/tests/ULoader.test.ts +74 -17
  34. package/ui.loader/types.ts +5 -0
  35. package/ui.loader-overlay/tests/ULoaderOverlay.test.ts +6 -15
  36. package/ui.loader-progress/tests/ULoaderProgress.test.ts +8 -18
  37. package/ui.navigation-breadcrumbs/tests/UBreadcrumbs.test.ts +18 -40
  38. package/ui.navigation-pagination/tests/UPagination.test.ts +18 -40
  39. package/ui.navigation-progress/tests/UProgress.test.ts +11 -25
  40. package/ui.navigation-tab/tests/UTab.test.ts +21 -46
  41. package/ui.navigation-tabs/tests/UTabs.test.ts +13 -30
  42. package/ui.other-chip/tests/UChip.test.ts +13 -29
  43. package/ui.other-dot/tests/UDot.test.ts +4 -10
  44. package/ui.other-theme-color-toggle/tests/UThemeColorToggle.test.ts +13 -29
  45. package/ui.skeleton/USkeleton.vue +6 -6
  46. package/ui.skeleton/config.ts +1 -13
  47. package/ui.skeleton/storybook/stories.ts +3 -20
  48. package/ui.skeleton/tests/USkeleton.test.ts +2 -27
  49. package/ui.skeleton/types.ts +0 -5
  50. package/ui.skeleton-choice/USkeletonChoice.vue +8 -8
  51. package/ui.skeleton-choice/config.ts +0 -1
  52. package/ui.skeleton-choice/storybook/stories.ts +3 -6
  53. package/ui.skeleton-choice/tests/USkeletonChoice.test.ts +7 -35
  54. package/ui.skeleton-choice/types.ts +0 -5
  55. package/ui.skeleton-input/USkeletonInput.vue +11 -10
  56. package/ui.skeleton-input/config.ts +0 -1
  57. package/ui.skeleton-input/storybook/stories.ts +4 -7
  58. package/ui.skeleton-input/tests/USkeletonInput.test.ts +11 -48
  59. package/ui.skeleton-input/types.ts +0 -5
  60. package/ui.skeleton-text/USkeletonText.vue +8 -8
  61. package/ui.skeleton-text/config.ts +2 -2
  62. package/ui.skeleton-text/storybook/stories.ts +1 -4
  63. package/ui.skeleton-text/tests/USkeletonText.test.ts +5 -32
  64. package/ui.skeleton-text/types.ts +0 -5
  65. package/ui.text-alert/tests/UAlert.test.ts +17 -38
  66. package/ui.text-badge/tests/UBadge.test.ts +19 -42
  67. package/ui.text-block/UText.vue +7 -7
  68. package/ui.text-block/config.ts +8 -7
  69. package/ui.text-block/storybook/stories.ts +13 -25
  70. package/ui.text-block/tests/UText.test.ts +27 -28
  71. package/ui.text-block/types.ts +6 -1
  72. package/ui.text-empty/tests/UEmpty.test.ts +14 -31
  73. package/ui.text-file/tests/UFile.test.ts +13 -30
  74. package/ui.text-files/tests/UFiles.test.ts +14 -32
  75. package/ui.text-header/config.ts +2 -0
  76. package/ui.text-header/tests/UHeader.test.ts +10 -23
  77. package/ui.text-notify/tests/UNotify.test.ts +12 -26
  78. package/ui.text-number/tests/UNumber.test.ts +16 -35
@@ -30,10 +30,8 @@ describe("UFiles.vue", () => {
30
30
  URL.createObjectURL = originalCreateObjectURL;
31
31
  });
32
32
 
33
- // Props tests
34
33
  describe("Props", () => {
35
- // FileList prop
36
- it("renders the correct number of files", () => {
34
+ it("FileList – renders the correct number of files", () => {
37
35
  const component = mount(UFiles, {
38
36
  props: {
39
37
  fileList,
@@ -45,8 +43,7 @@ describe("UFiles.vue", () => {
45
43
  expect(fileComponents.length).toBe(fileList.length);
46
44
  });
47
45
 
48
- // Label prop
49
- it("renders the correct label text", () => {
46
+ it("Label – renders the correct label text", () => {
50
47
  const label = "File List";
51
48
 
52
49
  const component = mount(UFiles, {
@@ -61,8 +58,7 @@ describe("UFiles.vue", () => {
61
58
  expect(labelComponent.props("label")).toBe(label);
62
59
  });
63
60
 
64
- // Description prop
65
- it("passes the correct description to ULabel", () => {
61
+ it("Description – passes the correct description to ULabel", () => {
66
62
  const description = "List of files";
67
63
 
68
64
  const component = mount(UFiles, {
@@ -77,8 +73,7 @@ describe("UFiles.vue", () => {
77
73
  expect(labelComponent.props("description")).toBe(description);
78
74
  });
79
75
 
80
- // Size prop
81
- it("passes the correct size prop to ULabel", () => {
76
+ it("Size – passes the correct size prop to ULabel", () => {
82
77
  const sizes = ["sm", "md", "lg"];
83
78
 
84
79
  sizes.forEach((size) => {
@@ -95,8 +90,7 @@ describe("UFiles.vue", () => {
95
90
  });
96
91
  });
97
92
 
98
- // Removable prop
99
- it("passes removable prop to UFile components", () => {
93
+ it("Removable – passes removable prop to UFile components", () => {
100
94
  const removable = true;
101
95
  const fileList = [createMockFile("file1.pdf")];
102
96
 
@@ -112,8 +106,7 @@ describe("UFiles.vue", () => {
112
106
  expect(fileComponent.props("removable")).toBe(removable);
113
107
  });
114
108
 
115
- // DataTest prop
116
- it("applies the correct data-test attribute to file items", () => {
109
+ it("DataTest – applies the correct data-test attribute to file items", () => {
117
110
  const dataTest = "test-files";
118
111
  const fileList = [createMockFile("file1.pdf")];
119
112
 
@@ -129,8 +122,7 @@ describe("UFiles.vue", () => {
129
122
  expect(fileComponent.attributes("data-test")).toBe(`${dataTest}-item-0`);
130
123
  });
131
124
 
132
- // Image file detection
133
- it("detects image files and sets imageUrl prop", () => {
125
+ it("Image detects image files and sets imageUrl prop", () => {
134
126
  const imageFile = createMockFile("image.jpg", "image/jpeg");
135
127
  const fileList = [imageFile];
136
128
 
@@ -146,10 +138,8 @@ describe("UFiles.vue", () => {
146
138
  });
147
139
  });
148
140
 
149
- // Slots tests
150
141
  describe("Slots", () => {
151
- // Default slot
152
- it("renders content from default slot", () => {
142
+ it("Default – renders content from default slot", () => {
153
143
  const slotContent = "Custom Content";
154
144
 
155
145
  const component = mount(UFiles, {
@@ -164,8 +154,7 @@ describe("UFiles.vue", () => {
164
154
  expect(component.text()).toContain(slotContent);
165
155
  });
166
156
 
167
- // Label slot
168
- it("renders content from label slot", () => {
157
+ it("Label – renders content from label slot", () => {
169
158
  const label = "File List";
170
159
  const slotText = "Custom Label";
171
160
  const slotClass = "label-content";
@@ -184,8 +173,7 @@ describe("UFiles.vue", () => {
184
173
  expect(component.find(`.${slotClass}`).text()).toBe(slotText);
185
174
  });
186
175
 
187
- // Before-file slot
188
- it("renders content from before-file slot", () => {
176
+ it("Before – renders content from before-file slot", () => {
189
177
  const slotText = "Before";
190
178
  const slotClass = "before-content";
191
179
 
@@ -206,8 +194,7 @@ describe("UFiles.vue", () => {
206
194
  expect(component.find(`.${slotClass}`).text()).toBe(`${slotText}0`);
207
195
  });
208
196
 
209
- // After-file slot
210
- it("renders content from after-file slot", () => {
197
+ it("After – renders content from after-file slot", () => {
211
198
  const slotText = "After";
212
199
  const slotClass = "after-content";
213
200
 
@@ -228,8 +215,7 @@ describe("UFiles.vue", () => {
228
215
  expect(component.find(`.${slotClass}`).text()).toBe(`${slotText}0`);
229
216
  });
230
217
 
231
- // File slot with bindings
232
- it("provides correct bindings to file slot", () => {
218
+ it("File – provides correct bindings to file slot", () => {
233
219
  const fileName = "file1.pdf";
234
220
  const fileIndex = "0";
235
221
  const fileList = [createMockFile(fileName)];
@@ -266,10 +252,8 @@ describe("UFiles.vue", () => {
266
252
  });
267
253
  });
268
254
 
269
- // Events tests
270
255
  describe("Events", () => {
271
- // Remove event
272
- it("emits remove event when file is removed", async () => {
256
+ it("Remove – emits remove event when file is removed", async () => {
273
257
  const fileList = [createMockFile("file1.pdf")];
274
258
  const fileId = "test-id";
275
259
  const removable = true;
@@ -291,10 +275,8 @@ describe("UFiles.vue", () => {
291
275
  });
292
276
  });
293
277
 
294
- // Exposed refs tests
295
278
  describe("Exposed refs", () => {
296
- // itemsRef
297
- it("exposes itemsRef", () => {
279
+ it("itemsRef – exposes itemsRef", () => {
298
280
  const component = mount(UFiles, {
299
281
  props: {
300
282
  fileList: [],
@@ -6,6 +6,7 @@ export default /*tw*/ {
6
6
  lifted: "text-{color}-lifted",
7
7
  accented: "text-{color}-accented",
8
8
  muted: "text-{color}/(--vl-disabled-opacity)",
9
+ inverted: "text-{color} brightness-125 dark:brightness-75",
9
10
  },
10
11
  color: {
11
12
  inherit: "text-inherit",
@@ -34,6 +35,7 @@ export default /*tw*/ {
34
35
  { color: "text", variant: "lifted", class: "text-lifted" },
35
36
  { color: "text", variant: "accented", class: "text-accented" },
36
37
  { color: "text", variant: "muted", class: "text-muted" },
38
+ { color: "text", variant: "inverted", class: "text-inverted brightness-100 dark:brightness-100" },
37
39
  ],
38
40
  },
39
41
  defaults: {
@@ -6,10 +6,8 @@ import UHeader from "../UHeader.vue";
6
6
  import type { Props } from "../types";
7
7
 
8
8
  describe("UHeader.vue", () => {
9
- // Props tests
10
9
  describe("Props", () => {
11
- // Size prop
12
- it("applies the correct size class", async () => {
10
+ it("Size – applies the correct size class", async () => {
13
11
  const size = {
14
12
  xs: "text-lg",
15
13
  sm: "text-xl",
@@ -30,8 +28,7 @@ describe("UHeader.vue", () => {
30
28
  });
31
29
  });
32
30
 
33
- // Color prop
34
- it("applies the correct color class", async () => {
31
+ it("Color – applies the correct color class", async () => {
35
32
  const colors = [
36
33
  "primary",
37
34
  "secondary",
@@ -58,8 +55,7 @@ describe("UHeader.vue", () => {
58
55
  });
59
56
  });
60
57
 
61
- // Variant prop
62
- it("applies the correct variant class", async () => {
58
+ it("Variant – applies the correct variant class", async () => {
63
59
  const variants = {
64
60
  default: "text-primary",
65
61
  lifted: "text-primary-lifted",
@@ -79,8 +75,7 @@ describe("UHeader.vue", () => {
79
75
  });
80
76
  });
81
77
 
82
- // Weight prop
83
- it("applies the correct weight class", async () => {
78
+ it("Weight – applies the correct weight class", async () => {
84
79
  const weights = {
85
80
  light: "font-light",
86
81
  normal: "font-normal",
@@ -100,8 +95,7 @@ describe("UHeader.vue", () => {
100
95
  });
101
96
  });
102
97
 
103
- // Label prop
104
- it("renders the correct label text", () => {
98
+ it("Label – renders the correct label text", () => {
105
99
  const label = "Header Text";
106
100
 
107
101
  const component = mount(UHeader, {
@@ -113,8 +107,7 @@ describe("UHeader.vue", () => {
113
107
  expect(component.text()).toBe(label);
114
108
  });
115
109
 
116
- // Tag prop
117
- it("renders the correct HTML tag", () => {
110
+ it("Tag – renders the correct HTML tag", () => {
118
111
  const tags = ["h1", "h2", "h3", "h4", "h5", "h6", "div", "span"];
119
112
 
120
113
  tags.forEach((tag) => {
@@ -128,8 +121,7 @@ describe("UHeader.vue", () => {
128
121
  });
129
122
  });
130
123
 
131
- // Line prop
132
- it("applies line class when line prop is true", () => {
124
+ it("Line – applies line class when line prop is true", () => {
133
125
  const line = true;
134
126
  const lineClasses = "leading-none";
135
127
 
@@ -142,8 +134,7 @@ describe("UHeader.vue", () => {
142
134
  expect(component.attributes("class")).toContain(lineClasses);
143
135
  });
144
136
 
145
- // DataTest prop
146
- it("applies the correct data-test attribute", () => {
137
+ it("DataTest – applies the correct data-test attribute", () => {
147
138
  const dataTest = "test-header";
148
139
 
149
140
  const component = mount(UHeader, {
@@ -156,10 +147,8 @@ describe("UHeader.vue", () => {
156
147
  });
157
148
  });
158
149
 
159
- // Slots tests
160
150
  describe("Slots", () => {
161
- // Default slot
162
- it("renders content from default slot", () => {
151
+ it("Default – renders content from default slot", () => {
163
152
  const slotContent = "Custom Content";
164
153
  const label = "Header";
165
154
 
@@ -177,10 +166,8 @@ describe("UHeader.vue", () => {
177
166
  });
178
167
  });
179
168
 
180
- // Exposed refs tests
181
169
  describe("Exposed refs", () => {
182
- // headerRef
183
- it("exposes headerRef", () => {
170
+ it("headerRef – exposes headerRef", () => {
184
171
  const component = mount(UHeader, {});
185
172
 
186
173
  expect(component.vm.headerRef).toBeDefined();
@@ -46,10 +46,8 @@ describe("UNotify.vue", () => {
46
46
  dispatchNotifyEvent("notifyClearAll", {} as Notification);
47
47
  });
48
48
 
49
- // Props tests
50
49
  describe("Props", () => {
51
- // XPosition prop
52
- it("applies the correct xPosition style", async () => {
50
+ it("X Position – applies the correct xPosition style", async () => {
53
51
  const positions = ["left", "center", "right"];
54
52
 
55
53
  for (const position of positions) {
@@ -73,8 +71,7 @@ describe("UNotify.vue", () => {
73
71
  }
74
72
  });
75
73
 
76
- // YPosition prop
77
- it("applies the correct yPosition style", async () => {
74
+ it("Y Position – applies the correct yPosition style", async () => {
78
75
  const positions = ["top", "bottom"];
79
76
 
80
77
  for (const position of positions) {
@@ -93,8 +90,7 @@ describe("UNotify.vue", () => {
93
90
  }
94
91
  });
95
92
 
96
- // DataTest prop
97
- it("applies the correct data-test attribute", () => {
93
+ it("DataTest – applies the correct data-test attribute", () => {
98
94
  const dataTest = "test-notify";
99
95
 
100
96
  const component = mountWithLocale({
@@ -107,8 +103,7 @@ describe("UNotify.vue", () => {
107
103
 
108
104
  // Event handling tests
109
105
  describe("Event Handling", () => {
110
- // notifyStart event
111
- it("adds notification when notifyStart event is dispatched", async () => {
106
+ it("notifyStart – adds notification when notifyStart event is dispatched", async () => {
112
107
  const component = mountWithLocale();
113
108
 
114
109
  dispatchNotifyEvent("notifyStart", mockNotification);
@@ -118,8 +113,7 @@ describe("UNotify.vue", () => {
118
113
  expect(component.text()).toContain(mockNotification.description);
119
114
  });
120
115
 
121
- // notifyEnd event
122
- it("removes notification when notifyEnd event is dispatched", async () => {
116
+ it("notifyEnd – removes notification when notifyEnd event is dispatched", async () => {
123
117
  const component = mountWithLocale();
124
118
 
125
119
  // Add notification
@@ -145,8 +139,7 @@ describe("UNotify.vue", () => {
145
139
  expect(finalCount).toBeLessThan(initialCount);
146
140
  });
147
141
 
148
- // notifyClearAll event
149
- it("clears all notifications when notifyClearAll event is dispatched", async () => {
142
+ it("notifyClearAll – clears all notifications when notifyClearAll event is dispatched", async () => {
150
143
  const component = mountWithLocale();
151
144
 
152
145
  // Add multiple notifications
@@ -176,8 +169,7 @@ describe("UNotify.vue", () => {
176
169
  expect(component.text()).not.toContain("Notification 2");
177
170
  });
178
171
 
179
- // Close button click
180
- it("removes notification when close button is clicked", async () => {
172
+ it("Close – removes notification when close button is clicked", async () => {
181
173
  const component = mountWithLocale();
182
174
 
183
175
  // Add notification
@@ -203,8 +195,7 @@ describe("UNotify.vue", () => {
203
195
 
204
196
  // Notification type tests
205
197
  describe("Notification Types", () => {
206
- // Success notification
207
- it("renders success notification with correct icon", async () => {
198
+ it("Success – renders success notification with correct icon", async () => {
208
199
  const component = mountWithLocale();
209
200
 
210
201
  dispatchNotifyEvent("notifyStart", {
@@ -223,8 +214,7 @@ describe("UNotify.vue", () => {
223
214
  expect(successIcon).toBeDefined();
224
215
  });
225
216
 
226
- // Warning notification
227
- it("renders warning notification with correct icon", async () => {
217
+ it("Warning – renders warning notification with correct icon", async () => {
228
218
  const component = mountWithLocale();
229
219
 
230
220
  dispatchNotifyEvent("notifyStart", {
@@ -243,8 +233,7 @@ describe("UNotify.vue", () => {
243
233
  expect(warningIcon).toBeDefined();
244
234
  });
245
235
 
246
- // Error notification
247
- it("renders error notification with correct icon", async () => {
236
+ it("Error – renders error notification with correct icon", async () => {
248
237
  const component = mountWithLocale();
249
238
 
250
239
  dispatchNotifyEvent("notifyStart", {
@@ -263,8 +252,7 @@ describe("UNotify.vue", () => {
263
252
  expect(errorIcon).toBeDefined();
264
253
  });
265
254
 
266
- // Info notification
267
- it("renders info notification with correct icon", async () => {
255
+ it("Info – renders info notification with correct icon", async () => {
268
256
  const component = mountWithLocale();
269
257
 
270
258
  dispatchNotifyEvent("notifyStart", {
@@ -284,10 +272,8 @@ describe("UNotify.vue", () => {
284
272
  });
285
273
  });
286
274
 
287
- // Exposed refs tests
288
275
  describe("Exposed refs", () => {
289
- // notificationRef
290
- it("exposes notificationRef", () => {
276
+ it("notificationRef – exposes notificationRef", () => {
291
277
  const component = mountWithLocale();
292
278
 
293
279
  expect(component.vm.notificationRef).toBeDefined();
@@ -13,10 +13,8 @@ describe("UNumber.vue", () => {
13
13
  value = 1234.56;
14
14
  });
15
15
 
16
- // Props tests
17
16
  describe("Props", () => {
18
- // Size prop
19
- it("applies the correct size class", async () => {
17
+ it("Size – applies the correct size class", async () => {
20
18
  const sizeClasses = {
21
19
  xs: "text-tiny",
22
20
  sm: "text-small",
@@ -35,8 +33,7 @@ describe("UNumber.vue", () => {
35
33
  });
36
34
  });
37
35
 
38
- // Color prop
39
- it("applies the correct color class", async () => {
36
+ it("Color – applies the correct color class", async () => {
40
37
  const colors = [
41
38
  "primary",
42
39
  "secondary",
@@ -60,8 +57,7 @@ describe("UNumber.vue", () => {
60
57
  });
61
58
  });
62
59
 
63
- // Value prop
64
- it("renders the correct number value", () => {
60
+ it("Value – renders the correct number value", () => {
65
61
  const expectedFormattedNumber = "1 234,56";
66
62
 
67
63
  const component = mount(UNumber, {
@@ -73,8 +69,7 @@ describe("UNumber.vue", () => {
73
69
  expect(component.text()).toContain(expectedFormattedNumber);
74
70
  });
75
71
 
76
- // Sign prop
77
- it("renders the correct sign based on sign prop", () => {
72
+ it("Sign – renders the correct sign based on sign prop", () => {
78
73
  const testNegativeValue = -123;
79
74
 
80
75
  // Auto sign (negative value)
@@ -135,8 +130,7 @@ describe("UNumber.vue", () => {
135
130
  expect(unsignedComponent.text()).not.toContain(MATH_SIGN.PLUS);
136
131
  });
137
132
 
138
- // Currency prop
139
- it("renders the currency symbol", () => {
133
+ it("Currency – renders the currency symbol", () => {
140
134
  const currency = "$";
141
135
 
142
136
  const component = mount(UNumber, {
@@ -149,8 +143,7 @@ describe("UNumber.vue", () => {
149
143
  expect(component.text()).toContain(currency);
150
144
  });
151
145
 
152
- // CurrencyAlign prop
153
- it("aligns currency correctly based on currencyAlign prop", () => {
146
+ it("CurrencyAlign – aligns currency correctly based on currencyAlign prop", () => {
154
147
  const currency = "$";
155
148
 
156
149
  const alignTests = [
@@ -171,8 +164,7 @@ describe("UNumber.vue", () => {
171
164
  });
172
165
  });
173
166
 
174
- // CurrencySpace prop
175
- it("adds space between currency and number when currencySpace is true", () => {
167
+ it("CurrencySpace – adds space between currency and number when currencySpace is true", () => {
176
168
  const currency = "$";
177
169
 
178
170
  const spaceTests = [
@@ -200,8 +192,7 @@ describe("UNumber.vue", () => {
200
192
  });
201
193
  });
202
194
 
203
- // MinFractionDigits prop
204
- it("adds zeros to meet the minimum fraction digits requirement", () => {
195
+ it("MinFractionDigits – adds zeros to meet the minimum fraction digits requirement", () => {
205
196
  const value = 123;
206
197
  const minFractionDigits = 2;
207
198
  const expectedMinFractionResult = "123,00";
@@ -216,8 +207,7 @@ describe("UNumber.vue", () => {
216
207
  expect(component.text()).toContain(expectedMinFractionResult);
217
208
  });
218
209
 
219
- // MaxFractionDigits prop
220
- it("rounds the fraction to the maximum number of digits", () => {
210
+ it("MaxFractionDigits – rounds the fraction to the maximum number of digits", () => {
221
211
  const value = 123.456789;
222
212
  const maxFractionDigits = 2;
223
213
  const expectedMaxFractionResult = "123,46"; // Rounded from .456789 to 2 digits
@@ -236,8 +226,7 @@ describe("UNumber.vue", () => {
236
226
  expect(component.text()).not.toContain(originalDecimalPart);
237
227
  });
238
228
 
239
- // DecimalSeparator prop
240
- it("uses the correct decimal separator", () => {
229
+ it("DecimalSeparator – uses the correct decimal separator", () => {
241
230
  const value = 123.45;
242
231
  const decimalSeparator = ",";
243
232
  const expectedFormattedNumber = "123,45";
@@ -252,8 +241,7 @@ describe("UNumber.vue", () => {
252
241
  expect(component.text()).toContain(expectedFormattedNumber);
253
242
  });
254
243
 
255
- // ThousandsSeparator prop
256
- it("uses the correct thousands separator", () => {
244
+ it("ThousandsSeparator – uses the correct thousands separator", () => {
257
245
  const value = 1234567.89;
258
246
  const thousandsSeparator = " ";
259
247
  const expectedFormattedInteger = "1 234 567";
@@ -268,8 +256,7 @@ describe("UNumber.vue", () => {
268
256
  expect(component.text()).toContain(expectedFormattedInteger);
269
257
  });
270
258
 
271
- // Align prop
272
- it("applies the correct align class", () => {
259
+ it("Align – applies the correct align class", () => {
273
260
  const alignClasses = {
274
261
  left: "justify-start",
275
262
  right: "justify-end",
@@ -286,8 +273,7 @@ describe("UNumber.vue", () => {
286
273
  });
287
274
  });
288
275
 
289
- // DataTest prop
290
- it("applies the correct data-test attribute", () => {
276
+ it("DataTest – applies the correct data-test attribute", () => {
291
277
  const testDataTest = "test-number";
292
278
 
293
279
  const component = mount(UNumber, {
@@ -300,10 +286,8 @@ describe("UNumber.vue", () => {
300
286
  });
301
287
  });
302
288
 
303
- // Slots tests
304
289
  describe("Slots", () => {
305
- // Left slot
306
- it("renders content from left slot", () => {
290
+ it("Left – renders content from left slot", () => {
307
291
  const slotText = "Left";
308
292
  const slotClass = "left-content";
309
293
 
@@ -320,8 +304,7 @@ describe("UNumber.vue", () => {
320
304
  expect(component.find(`.${slotClass}`).text()).toBe(slotText);
321
305
  });
322
306
 
323
- // Right slot
324
- it("renders content from right slot", () => {
307
+ it("Right – renders content from right slot", () => {
325
308
  const slotText = "Right";
326
309
  const slotClass = "right-content";
327
310
 
@@ -339,10 +322,8 @@ describe("UNumber.vue", () => {
339
322
  });
340
323
  });
341
324
 
342
- // Exposed refs tests
343
325
  describe("Exposed refs", () => {
344
- // wrapperRef
345
- it("exposes wrapperRef", () => {
326
+ it("wrapperRef – exposes wrapperRef", () => {
346
327
  const component = mount(UNumber, {});
347
328
 
348
329
  expect(component.vm.wrapperRef).toBeDefined();