@zap-wunschlachen/wl-shared-components 1.0.11 → 1.0.13

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 (232) hide show
  1. package/.github/workflows/playwright.yml +205 -205
  2. package/.github/workflows/static.yml +61 -61
  3. package/.github/workflows/update-snapshots.yml +37 -37
  4. package/.prettierrc +5 -5
  5. package/.storybook/main.ts +18 -18
  6. package/.storybook/preview.ts +37 -37
  7. package/.storybook/storyWrapper.vue +18 -18
  8. package/.storybook/withVuetifyTheme.decorator.ts +21 -21
  9. package/App.vue +147 -147
  10. package/README.md +56 -56
  11. package/heroicons.ts +75 -75
  12. package/index.html +19 -19
  13. package/package.json +67 -67
  14. package/playwright.config.ts +48 -48
  15. package/public/background.svg +60 -60
  16. package/public/style.css +187 -187
  17. package/public/technologies.svg +22 -22
  18. package/src/assets/css/base.css +235 -235
  19. package/src/assets/css/variables.css +96 -96
  20. package/src/components/Accordion/Accordion.css +59 -59
  21. package/src/components/Accordion/AccordionGroup.vue +51 -51
  22. package/src/components/Accordion/AccordionItem.vue +66 -66
  23. package/src/components/Appointment/Card/Actions.css +28 -28
  24. package/src/components/Appointment/Card/Actions.vue +72 -72
  25. package/src/components/Appointment/Card/Card.css +80 -80
  26. package/src/components/Appointment/Card/Card.vue +87 -81
  27. package/src/components/Appointment/Card/Details.css +50 -50
  28. package/src/components/Appointment/Card/Details.vue +43 -43
  29. package/src/components/Audio/Audio.vue +187 -187
  30. package/src/components/Audio/Waveform.vue +117 -117
  31. package/src/components/Button/Button.vue +119 -119
  32. package/src/components/CheckBox/CheckBox.css +185 -185
  33. package/src/components/CheckBox/Checkbox.vue +130 -130
  34. package/src/components/DateInput/DateInput.css +2 -2
  35. package/src/components/DateInput/DateInput.vue +262 -262
  36. package/src/components/Dialog/Dialog.css +6 -6
  37. package/src/components/Dialog/Dialog.vue +29 -29
  38. package/src/components/EditField/EditField.css +19 -19
  39. package/src/components/EditField/EditField.vue +202 -202
  40. package/src/components/IconBullet/IconBullet.vue +86 -86
  41. package/src/components/IconBullet/IconBulletList.vue +41 -41
  42. package/src/components/Icons/AdvanceAppointments.vue +153 -153
  43. package/src/components/Icons/Audio/CloudFailed.vue +20 -20
  44. package/src/components/Icons/Audio/CloudSaved.vue +21 -21
  45. package/src/components/Icons/Audio/Delete.vue +15 -15
  46. package/src/components/Icons/Audio/Pause.vue +18 -18
  47. package/src/components/Icons/Audio/Play.vue +15 -15
  48. package/src/components/Icons/CalendarNotification.vue +126 -126
  49. package/src/components/Icons/Chair.vue +32 -32
  50. package/src/components/Icons/ChairNotification.vue +35 -35
  51. package/src/components/Icons/Circle.vue +66 -66
  52. package/src/components/Icons/FavIcon.vue +22 -22
  53. package/src/components/Icons/FilledCircle.vue +11 -11
  54. package/src/components/Icons/Group3.vue +46 -46
  55. package/src/components/Icons/RingNotification.vue +54 -54
  56. package/src/components/Icons/SolidArrowRight.vue +14 -14
  57. package/src/components/Icons/calendar.vue +17 -17
  58. package/src/components/Icons/checkbox.vue +19 -19
  59. package/src/components/Icons/outlineChecked.vue +27 -27
  60. package/src/components/Icons/play.vue +5 -5
  61. package/src/components/Input/Input.css +187 -187
  62. package/src/components/Input/Input.vue +247 -247
  63. package/src/components/Laboratory/AppointmentCard/AppointmentCard.css +7 -7
  64. package/src/components/Laboratory/AppointmentCard/AppointmentCard.vue +116 -116
  65. package/src/components/Laboratory/ChatBoxImage/ChatBoxImage.vue +81 -81
  66. package/src/components/Laboratory/ChatMessage/ChatMessage.vue +113 -113
  67. package/src/components/Laboratory/ChatMessage/ChatMessageBadge.css +4 -4
  68. package/src/components/Laboratory/ChatMessage/ChatMessageBadge.vue +99 -99
  69. package/src/components/Laboratory/ChatNotification/ChatNotification.vue +130 -130
  70. package/src/components/Laboratory/DocumentCard/DocumentCard.css +3 -3
  71. package/src/components/Laboratory/DocumentCard/DocumentCard.vue +50 -50
  72. package/src/components/Laboratory/DocumentCard/DocumentCardItem.vue +53 -53
  73. package/src/components/Laboratory/InfoCard/InfoCard.vue +162 -162
  74. package/src/components/Laboratory/MainColumnsBar/MainColumnsBar.vue +102 -102
  75. package/src/components/Laboratory/ProgressCircle/ProgressCircle.vue +152 -152
  76. package/src/components/Laboratory/ProgressLinear/ProgressLinear.css +33 -33
  77. package/src/components/Laboratory/ProgressLinear/ProgressLinear.vue +75 -75
  78. package/src/components/Laboratory/SelectionColumnBar/SelectionColumnBar.vue +92 -92
  79. package/src/components/Laboratory/StatusNotification/StatusNotification.vue +49 -49
  80. package/src/components/Laboratory/TagLabel/TagLabel.vue +126 -126
  81. package/src/components/Laboratory/TagLabelGroup/TagLabelGroup.vue +97 -97
  82. package/src/components/Laboratory/TicketCard/TicketCard.css +3 -3
  83. package/src/components/Laboratory/TicketCard/TicketCard.vue +143 -143
  84. package/src/components/Laboratory/TimeLine/TimeLineEvent.css +18 -18
  85. package/src/components/Laboratory/TimeLine/TimeLineEvent.vue +119 -119
  86. package/src/components/Laboratory/TimeLine/Timeline.css +4 -4
  87. package/src/components/Laboratory/TimeLine/Timeline.vue +30 -30
  88. package/src/components/Modal/Modal.css +5 -5
  89. package/src/components/Modal/Modal.vue +22 -22
  90. package/src/components/NotificationBubble/NotificationBubble.css +4 -4
  91. package/src/components/NotificationBubble/NotificationBubble.vue +90 -90
  92. package/src/components/OtpInput/OtpInput.css +39 -39
  93. package/src/components/OtpInput/OtpInput.vue +143 -143
  94. package/src/components/PhoneInput/PhoneInput.css +31 -31
  95. package/src/components/PhoneInput/PhoneInput.vue +113 -113
  96. package/src/components/Select/Select.css +150 -150
  97. package/src/components/Select/Select.vue +304 -304
  98. package/src/components/TextArea/TextArea.css +3 -3
  99. package/src/components/TextArea/TextArea.vue +126 -126
  100. package/src/components/TickBox/TickBox.css +49 -49
  101. package/src/components/TickBox/TickBox.vue +126 -126
  102. package/src/components/index.ts +22 -22
  103. package/src/constants/iconEnums.ts +3 -3
  104. package/src/i18n/i18n.ts +15 -15
  105. package/src/i18n/locales/de.json +27 -27
  106. package/src/i18n/locales/en.json +27 -27
  107. package/src/index.ts +31 -31
  108. package/src/main.ts +11 -11
  109. package/src/plugins/vuetify.ts +131 -131
  110. package/src/shims-vue.d.ts +10 -10
  111. package/src/stories/Accordion.stories.ts +650 -650
  112. package/src/stories/Audio.stories.ts +28 -28
  113. package/src/stories/Button.stories.ts +263 -263
  114. package/src/stories/CheckBox.stories.ts +348 -348
  115. package/src/stories/DateInput.stories.ts +53 -53
  116. package/src/stories/Dialog.stories.ts +147 -147
  117. package/src/stories/EditField.stories.ts +78 -78
  118. package/src/stories/IconBullet/IconBullet.stories.ts +201 -201
  119. package/src/stories/IconBullet/IconBulletList.stories.ts +275 -275
  120. package/src/stories/Input.stories.ts +351 -351
  121. package/src/stories/Laboratory/Cards/AppointmentCard/AppointmentCard.stories.ts +260 -260
  122. package/src/stories/Laboratory/Cards/DocumentCard/DocumentCard.stories.ts +176 -176
  123. package/src/stories/Laboratory/Cards/DocumentCard/DocumentCardItem.stories.ts +119 -119
  124. package/src/stories/Laboratory/Cards/InfoCard/InfoCard.stories.ts +320 -320
  125. package/src/stories/Laboratory/Cards/TicketCard/TicketCard.stories.ts +335 -335
  126. package/src/stories/Laboratory/Chat/ChatBoxImage.stories.ts +82 -82
  127. package/src/stories/Laboratory/Chat/ChatMessage.stories.ts +198 -198
  128. package/src/stories/Laboratory/Chat/ChatMessageBadge.stories.ts +204 -204
  129. package/src/stories/Laboratory/Chat/ChatNotification.stories.ts +144 -144
  130. package/src/stories/Laboratory/Chat/ProgressLinear.stories.ts +186 -186
  131. package/src/stories/Laboratory/Chat/StatusNotification.stories.ts +111 -111
  132. package/src/stories/Laboratory/MainColumnsBar.stories.ts +48 -48
  133. package/src/stories/Laboratory/ProgressCircle.stories.ts +261 -261
  134. package/src/stories/Laboratory/SelectionColumnBar.stories.ts +234 -234
  135. package/src/stories/Laboratory/TagLabel.stories.ts +418 -418
  136. package/src/stories/Laboratory/TagLabelGroup.stories.ts +234 -234
  137. package/src/stories/Laboratory/Timeline.stories.ts +403 -403
  138. package/src/stories/NotificationBubble.stories.ts +194 -194
  139. package/src/stories/OtpInput.stories.ts +100 -100
  140. package/src/stories/PhoneInput.stories.ts +52 -52
  141. package/src/stories/Select.stories.ts +419 -419
  142. package/src/stories/TextArea.stories.ts +112 -112
  143. package/src/stories/TickBox.stories.ts +294 -294
  144. package/src/stories/v-icon.stories.ts +91 -91
  145. package/src/utils/index.ts +41 -41
  146. package/src/vite-env.d.ts +1 -1
  147. package/tests/e2e/README.md +220 -220
  148. package/tests/e2e/accessibility.spec.ts +638 -638
  149. package/tests/e2e/accordion.spec.ts +42 -42
  150. package/tests/e2e/additional-components.spec.ts +437 -437
  151. package/tests/e2e/all-components.spec.ts +135 -135
  152. package/tests/e2e/appointment-card.spec.ts +816 -816
  153. package/tests/e2e/button-fixed.spec.ts +58 -58
  154. package/tests/e2e/button.spec.ts +76 -76
  155. package/tests/e2e/checkbox.spec.ts +50 -50
  156. package/tests/e2e/date-input.spec.ts +46 -46
  157. package/tests/e2e/debug.spec.ts +51 -51
  158. package/tests/e2e/dialog.spec.ts +58 -58
  159. package/tests/e2e/input.spec.ts +55 -55
  160. package/tests/e2e/laboratory-components.spec.ts +320 -320
  161. package/tests/e2e/otp-input.spec.ts +50 -50
  162. package/tests/e2e/select.spec.ts +52 -52
  163. package/tests/e2e/storybook-utils.ts +59 -59
  164. package/tests/e2e/test-basic.spec.ts +33 -33
  165. package/tests/e2e/visual-regression.spec.ts +350 -350
  166. package/tests/unit/components/Accordion/AccordionGroup.spec.ts.skip +342 -342
  167. package/tests/unit/components/Accordion/AccordionItem.spec.ts.skip +383 -383
  168. package/tests/unit/components/Appointment/Card/Actions.spec.ts +407 -407
  169. package/tests/unit/components/Appointment/Card/Card.spec.ts +485 -485
  170. package/tests/unit/components/Appointment/Card/Details.spec.ts +397 -397
  171. package/tests/unit/components/Audio/Audio.spec.ts +403 -403
  172. package/tests/unit/components/Audio/Waveform.spec.ts +483 -483
  173. package/tests/unit/components/Core/Button.spec.ts +336 -336
  174. package/tests/unit/components/Core/Checkbox.spec.ts +544 -544
  175. package/tests/unit/components/Core/DateInput.spec.ts +690 -690
  176. package/tests/unit/components/Core/Dialog.spec.ts +485 -485
  177. package/tests/unit/components/Core/EditField.spec.ts +782 -782
  178. package/tests/unit/components/Core/Input.spec.ts +512 -512
  179. package/tests/unit/components/Core/Modal.spec.ts +518 -518
  180. package/tests/unit/components/Core/NotificationBubble.spec.ts +606 -606
  181. package/tests/unit/components/Core/OtpInput.spec.ts +708 -708
  182. package/tests/unit/components/Core/PhoneInput.spec.ts +619 -619
  183. package/tests/unit/components/Core/Select.spec.ts +712 -712
  184. package/tests/unit/components/Core/TextArea.spec.ts +565 -565
  185. package/tests/unit/components/Core/TickBox.spec.ts +779 -779
  186. package/tests/unit/components/IconBullet/IconBullet.spec.ts +356 -356
  187. package/tests/unit/components/IconBullet/IconBulletList.spec.ts +371 -371
  188. package/tests/unit/components/Icons/Audio/CloudFailed.spec.ts +108 -108
  189. package/tests/unit/components/Icons/Audio/CloudSaved.spec.ts +149 -149
  190. package/tests/unit/components/Icons/Audio/Delete.spec.ts +158 -158
  191. package/tests/unit/components/Icons/Audio/Pause.spec.ts +208 -208
  192. package/tests/unit/components/Icons/Audio/Play.spec.ts +217 -217
  193. package/tests/unit/components/Icons/CalendarNotification.spec.ts +186 -186
  194. package/tests/unit/components/Icons/Chair.spec.ts +234 -234
  195. package/tests/unit/components/Icons/ChairNotification.spec.ts +311 -311
  196. package/tests/unit/components/Icons/Circle.spec.ts +255 -255
  197. package/tests/unit/components/Icons/FavIcon.spec.ts +251 -251
  198. package/tests/unit/components/Icons/FilledCircle.spec.ts +274 -274
  199. package/tests/unit/components/Icons/Group3.spec.ts +355 -355
  200. package/tests/unit/components/Icons/RingNotification.spec.ts +393 -393
  201. package/tests/unit/components/Icons/calendar.spec.ts +286 -286
  202. package/tests/unit/components/Icons/checkbox.spec.ts +315 -315
  203. package/tests/unit/components/Icons/outlineChecked.spec.ts +434 -434
  204. package/tests/unit/components/Icons/play.spec.ts +308 -308
  205. package/tests/unit/components/Laboratory/AppointmentCard.spec.ts +167 -167
  206. package/tests/unit/components/Laboratory/ChatBoxImage.spec.ts +179 -179
  207. package/tests/unit/components/Laboratory/ChatMessage.spec.ts +263 -263
  208. package/tests/unit/components/Laboratory/ChatMessageBadge.spec.ts +282 -282
  209. package/tests/unit/components/Laboratory/ChatNotification.spec.ts +256 -256
  210. package/tests/unit/components/Laboratory/DocumentCard.spec.ts +228 -228
  211. package/tests/unit/components/Laboratory/DocumentCardItem.spec.ts +236 -236
  212. package/tests/unit/components/Laboratory/InfoCard.spec.ts +308 -308
  213. package/tests/unit/components/Laboratory/MainColumnsBar.spec.ts +251 -251
  214. package/tests/unit/components/Laboratory/ProgressCircle.spec.ts +290 -290
  215. package/tests/unit/components/Laboratory/ProgressLinear.spec.ts +275 -275
  216. package/tests/unit/components/Laboratory/SelectionColumnBar.spec.ts +288 -288
  217. package/tests/unit/components/Laboratory/StatusNotification.spec.ts +296 -296
  218. package/tests/unit/components/Laboratory/TagLabel.spec.ts +353 -353
  219. package/tests/unit/components/Laboratory/TagLabelGroup.spec.ts +377 -377
  220. package/tests/unit/components/Laboratory/TicketCard.spec.ts +351 -351
  221. package/tests/unit/components/Laboratory/TimeLineEvent.spec.ts +381 -381
  222. package/tests/unit/components/Laboratory/Timeline.spec.ts +419 -419
  223. package/tests/unit/constants/iconEnums.spec.ts +39 -39
  224. package/tests/unit/i18n/i18n.spec.ts +88 -88
  225. package/tests/unit/plugins/vuetify.spec.ts +220 -220
  226. package/tests/unit/setup.ts +189 -189
  227. package/tests/unit/src/components/index.spec.ts.skip +192 -192
  228. package/tests/unit/src/index.spec.ts.skip +182 -182
  229. package/tests/unit/src/main.spec.ts +151 -151
  230. package/tsconfig.json +26 -26
  231. package/vite.config.ts +29 -29
  232. package/vitest.config.ts +83 -83
@@ -1,438 +1,438 @@
1
- import { test, expect, Frame } from '@playwright/test';
2
- import { navigateToStory, getComponentButton, getComponentInput, getComponentElement } from './storybook-utils';
3
-
4
- test.describe('Additional Components', () => {
5
- let frame: Frame;
6
-
7
- test.describe('Audio Component', () => {
8
- test.beforeEach(async ({ page }) => {
9
- frame = await navigateToStory(page, '/?path=/story/wl-audio--default');
10
- }, { timeout: 45000 });
11
-
12
- test('renders audio component', async ({ page }) => {
13
- const audioComponent = frame.locator('.audio-component, .waveform, audio').first();
14
- await expect(audioComponent).toBeVisible();
15
- });
16
-
17
- test('has audio controls', async ({ page }) => {
18
- const playButton = frame.locator('button[aria-label*="play"], button[title*="play"], .play-button').first();
19
- if (await playButton.count() > 0) {
20
- await expect(playButton).toBeVisible();
21
- await playButton.click();
22
- }
23
- });
24
-
25
- test('displays waveform if present', async ({ page }) => {
26
- const waveform = frame.locator('.waveform, canvas, svg').first();
27
- if (await waveform.count() > 0) {
28
- await expect(waveform).toBeVisible();
29
- }
30
- });
31
- });
32
-
33
- test.describe('Edit Field Component', () => {
34
- test.beforeEach(async ({ page }) => {
35
- frame = await navigateToStory(page, '/?path=/story/wl-editfield--text-field');
36
- }, { timeout: 45000 });
37
-
38
- test('renders edit field', async ({ page }) => {
39
- const editField = frame.locator('.wl-edit-field, .v-input, .v-field').first();
40
- await expect(editField).toBeVisible();
41
- });
42
-
43
- test('can toggle between edit and display mode', async ({ page }) => {
44
- const editButton = frame.locator('button[aria-label*="edit"], .edit-button, [class*="edit"]').first();
45
-
46
- if (await editButton.count() > 0) {
47
- await editButton.click();
48
-
49
- const input = frame.locator('input, .v-field input').first();
50
- if (await input.count() > 0) {
51
- await expect(input).toBeVisible();
52
- }
53
- }
54
- });
55
-
56
- test('saves changes when confirmed', async ({ page }) => {
57
- const editButton = frame.locator('button[aria-label*="edit"], .edit-button, [class*="edit"]').first();
58
-
59
- if (await editButton.count() > 0) {
60
- await editButton.click();
61
-
62
- const input = frame.locator('input, .v-field input').first();
63
- if (await input.count() > 0) {
64
- await input.fill('Updated text');
65
-
66
- const saveButton = frame.locator('button[aria-label*="save"], button[aria-label*="confirm"], .save-button').first();
67
- if (await saveButton.count() > 0) {
68
- await saveButton.click();
69
- } else {
70
- // Try Enter key
71
- await input.press('Enter');
72
- }
73
- }
74
- }
75
- });
76
- });
77
-
78
- test.describe('Phone Input Component', () => {
79
- test.beforeEach(async ({ page }) => {
80
- frame = await navigateToStory(page, '/?path=/story/wl-phoneinput--default');
81
- }, { timeout: 45000 });
82
-
83
- test('renders phone input with country selector', async ({ page }) => {
84
- const phoneInput = frame.locator('.phone-input, .v-field').first();
85
- await expect(phoneInput).toBeVisible();
86
-
87
- const countrySelector = frame.locator('.country-select, .flag, [class*="country"]').first();
88
- if (await countrySelector.count() > 0) {
89
- await expect(countrySelector).toBeVisible();
90
- }
91
- });
92
-
93
- test('accepts phone number input', async ({ page }) => {
94
- // Find the actual phone number input field (not the country selector)
95
- const phoneNumberInputs = frame.locator('input[type="tel"], input[type="text"]');
96
- // Skip the first input which is the country selector
97
- const phoneNumberInput = await phoneNumberInputs.count() > 1 ? phoneNumberInputs.nth(1) : phoneNumberInputs.first();
98
-
99
- await phoneNumberInput.fill('1234567890');
100
- await expect(phoneNumberInput).toHaveValue('1234567890');
101
- });
102
-
103
- test('country selector opens dropdown', async ({ page }) => {
104
- const countrySelector = frame.locator('.country-select, .flag, [class*="country"]').first();
105
-
106
- if (await countrySelector.count() > 0) {
107
- await countrySelector.click();
108
-
109
- const dropdown = frame.locator('.v-menu, .country-list, .dropdown').first();
110
- if (await dropdown.count() > 0) {
111
- await expect(dropdown).toBeVisible();
112
- }
113
- }
114
- });
115
- });
116
-
117
- test.describe('TextArea Component', () => {
118
- test.beforeEach(async ({ page }) => {
119
- frame = await navigateToStory(page, '/?path=/story/wl-textarea--default');
120
- }, { timeout: 45000 });
121
-
122
- test('renders textarea', async ({ page }) => {
123
- const textarea = frame.locator('textarea, .v-textarea').first();
124
- await expect(textarea).toBeVisible();
125
- });
126
-
127
- test('accepts multi-line text input', async ({ page }) => {
128
- const textarea = frame.locator('textarea, .v-textarea textarea').first();
129
- const multilineText = 'Line 1\nLine 2\nLine 3';
130
-
131
- await textarea.fill(multilineText);
132
- await expect(textarea).toHaveValue(multilineText);
133
- });
134
-
135
- test('handles resize if enabled', async ({ page }) => {
136
- const textarea = frame.locator('textarea, .v-textarea textarea').first();
137
-
138
- // Check if resize is possible
139
- const resizable = await textarea.evaluate((el: HTMLTextAreaElement) => {
140
- const style = window.getComputedStyle(el);
141
- return style.resize !== 'none';
142
- });
143
-
144
- if (resizable) {
145
- // Textarea should be resizable
146
- expect(resizable).toBeTruthy();
147
- }
148
- });
149
-
150
- test('shows character count if enabled', async ({ page }) => {
151
- const characterCount = frame.locator('.character-count, .v-counter, [class*="counter"]').first();
152
-
153
- if (await characterCount.count() > 0) {
154
- await expect(characterCount).toBeVisible();
155
-
156
- const textarea = frame.locator('textarea, .v-textarea textarea').first();
157
- await textarea.fill('Test text');
158
-
159
- const countText = await characterCount.textContent();
160
- expect(countText?.includes('9') || countText?.includes('Test text'.length.toString())).toBeTruthy();
161
- }
162
- });
163
- });
164
-
165
- test.describe('TickBox Component', () => {
166
- test.beforeEach(async ({ page }) => {
167
- frame = await navigateToStory(page, '/?path=/story/wl-tickbox--default');
168
- }, { timeout: 45000 });
169
-
170
- test('renders tickbox', async ({ page }) => {
171
- const tickbox = frame.locator('.tick-box, .v-checkbox, input[type="checkbox"]').first();
172
- await expect(tickbox).toBeVisible();
173
- });
174
-
175
- test('can be checked and unchecked', async ({ page }) => {
176
- const checkbox = frame.locator('input[type="checkbox"]').first();
177
-
178
- // Get initial state
179
- const initiallyChecked = await checkbox.isChecked();
180
-
181
- // Click the checkbox directly to toggle it
182
- await checkbox.click({ force: true });
183
- await page.waitForTimeout(500);
184
-
185
- // Verify state changed
186
- await expect(checkbox).toBeChecked({ checked: !initiallyChecked });
187
-
188
- // Click again to toggle back
189
- await checkbox.click({ force: true });
190
- await page.waitForTimeout(500);
191
-
192
- // Verify returned to initial state
193
- await expect(checkbox).toBeChecked({ checked: initiallyChecked });
194
- });
195
-
196
- test('displays custom tick styling', async ({ page }) => {
197
- const tickboxWrapper = frame.locator('.tick-box, .v-checkbox, label').first();
198
- await tickboxWrapper.click({ force: true });
199
-
200
- const tickIcon = frame.locator('.v-icon, .tick-icon, [class*="check"]').first();
201
- if (await tickIcon.count() > 0) {
202
- await expect(tickIcon).toBeVisible();
203
- }
204
- });
205
- });
206
-
207
- test.describe.skip('Modal Component', () => {
208
- // Skip Modal tests as the component doesn't exist
209
- test.beforeEach(async ({ page }) => {
210
- frame = await navigateToStory(page, '/?path=/story/wl-modal--default');
211
- }, { timeout: 45000 });
212
-
213
- test('modal trigger renders', async ({ page }) => {
214
- const trigger = frame.locator('button').first();
215
- await expect(trigger).toBeVisible();
216
- });
217
-
218
- test('opens modal when triggered', async ({ page }) => {
219
- const trigger = frame.locator('button').first();
220
- await trigger.click();
221
-
222
- const modal = frame.locator('.v-dialog, .modal, [role="dialog"]').first();
223
- await expect(modal).toBeVisible();
224
- });
225
-
226
- test('closes modal with close button', async ({ page }) => {
227
- const trigger = frame.locator('button').first();
228
- await trigger.click();
229
-
230
- const modal = frame.locator('.v-dialog, .modal, [role="dialog"]').first();
231
- await expect(modal).toBeVisible();
232
-
233
- const closeButton = frame.locator('button').filter({ hasText: /close|×/i }).first();
234
- if (await closeButton.count() > 0) {
235
- await closeButton.click();
236
- await expect(modal).not.toBeVisible();
237
- }
238
- });
239
- });
240
-
241
- test.describe('Notification Bubble Component', () => {
242
- test.beforeEach(async ({ page }) => {
243
- frame = await navigateToStory(page, '/?path=/story/wl-notificationbubble--with-text');
244
- }, { timeout: 45000 });
245
-
246
- test('renders notification bubble', async ({ page }) => {
247
- const notification = frame.locator('.notification-bubble, button.v-btn').first();
248
- await expect(notification).toBeVisible();
249
- });
250
-
251
- test('displays notification content', async ({ page }) => {
252
- const notification = frame.locator('.notification-bubble, button.v-btn').first();
253
- const content = await notification.textContent();
254
- // Check if content exists and is not empty
255
- if (!content || content.trim() === '') {
256
- // Try to find h4 or v-icon inside the button
257
- const textElement = notification.locator('h4');
258
- const iconElement = notification.locator('.v-icon');
259
-
260
- if (await textElement.count() > 0) {
261
- const text = await textElement.textContent();
262
- expect(text?.trim()).toBeTruthy();
263
- } else if (await iconElement.count() > 0) {
264
- await expect(iconElement).toBeVisible();
265
- } else {
266
- // At least the button should be visible
267
- await expect(notification).toBeVisible();
268
- }
269
- } else {
270
- expect(content.trim()).toBeTruthy();
271
- }
272
- });
273
-
274
- test('can be dismissed if dismissible', async ({ page }) => {
275
- const dismissButton = frame.locator('button[aria-label*="dismiss"], button[aria-label*="close"], .close-button').first();
276
-
277
- if (await dismissButton.count() > 0) {
278
- const notification = frame.locator('.notification-bubble, .v-alert, .notification').first();
279
- await dismissButton.click();
280
- await expect(notification).not.toBeVisible();
281
- }
282
- });
283
- });
284
-
285
- test.describe.skip('Icon Components', () => {
286
- // Skip individual icon tests to avoid navigation issues
287
- const iconStories = [
288
- '/?path=/story/wl-icons-calendar--default',
289
- '/?path=/story/wl-icons-chair--default',
290
- '/?path=/story/wl-icons-circle--default'
291
- ];
292
-
293
- iconStories.forEach((story, index) => {
294
- test(`icon component ${index + 1} renders`, async ({ page }) => {
295
- try {
296
- await page.goto(story);
297
- await page.waitForSelector('[data-testid="root"]', { timeout: 5000 });
298
-
299
- const icon = frame.locator('svg, i, .icon, .v-icon').first();
300
- await expect(icon).toBeVisible();
301
- } catch (error) {
302
- // Skip if story doesn't exist
303
- console.log(`Icon story ${story} not found, skipping`);
304
- }
305
- });
306
- });
307
- });
308
-
309
- test.describe('Icon Bullet Components', () => {
310
- test.beforeEach(async ({ page }) => {
311
- frame = await navigateToStory(page, '/?path=/story/wl-iconbullet-iconbullet--with-content');
312
- }, { timeout: 45000 });
313
-
314
- test('renders icon bullet', async ({ page }) => {
315
- // Wait for content to load
316
- await page.waitForTimeout(1000);
317
-
318
- // Look for the IconBullet component structure (d-flex container with icon and content)
319
- const iconBulletContainer = frame.locator('.d-flex.align-start').first();
320
-
321
- if (await iconBulletContainer.count() > 0) {
322
- await expect(iconBulletContainer).toBeVisible();
323
-
324
- // Verify icon is present
325
- const icon = iconBulletContainer.locator('.v-icon, svg').first();
326
- if (await icon.count() > 0) {
327
- await expect(icon).toBeVisible();
328
- }
329
-
330
- // Verify content is present
331
- const content = iconBulletContainer.locator('div').nth(1);
332
- if (await content.count() > 0) {
333
- await expect(content).toBeVisible();
334
- }
335
- } else {
336
- // Fallback: check for any visible content
337
- const anyContent = frame.locator('body').first();
338
- const htmlContent = await anyContent.innerHTML();
339
- expect(htmlContent.length).toBeGreaterThan(0);
340
- }
341
- });
342
-
343
- test('displays icon and content', async ({ page }) => {
344
- const icon = frame.locator('svg, i, .icon, .v-icon').first();
345
- if (await icon.count() > 0) {
346
- await expect(icon).toBeVisible();
347
- }
348
-
349
- const content = await frame.locator('body').textContent();
350
- expect(content?.trim()).toBeTruthy();
351
- });
352
-
353
- test.skip('icon bullet list renders multiple items', async ({ page }) => {
354
- // Skip this test due to frame detach issues
355
- await page.goto('/?path=/story/wl-iconbullet-iconbulletlist--default');
356
-
357
- if (await frame.locator('[data-testid="root"]').count() > 0) {
358
- const bulletItems = frame.locator('.icon-bullet, .bullet-point, .list-item');
359
- const itemCount = await bulletItems.count();
360
- expect(itemCount).toBeGreaterThan(0);
361
- }
362
- });
363
- });
364
-
365
- // Cross-component integration tests
366
- test.describe('Component Integration', () => {
367
- test('components work together in complex layouts', async ({ page }) => {
368
- // Test with a complex story that combines multiple components
369
- frame = await navigateToStory(page, '/?path=/story/wl-button--default');
370
-
371
- // Test tab navigation across multiple components
372
- await page.keyboard.press('Tab');
373
-
374
- // Check for any focusable element
375
- const focusableElements = frame.locator('button:visible, input:visible, select:visible, textarea:visible, a[href]:visible');
376
- const firstFocusable = focusableElements.first();
377
-
378
- if (await firstFocusable.count() > 0) {
379
- await expect(firstFocusable).toBeVisible();
380
- }
381
- });
382
-
383
- test('components maintain state independently', async ({ page }) => {
384
- // Navigate to a story with multiple interactive components
385
- frame = await navigateToStory(page, '/?path=/story/wl-input--default');
386
-
387
- const inputs = frame.locator('input');
388
- if (await inputs.count() > 1) {
389
- // Fill first input
390
- await inputs.nth(0).fill('First input');
391
- await expect(inputs.nth(0)).toHaveValue('First input');
392
-
393
- // Fill second input
394
- await inputs.nth(1).fill('Second input');
395
- await expect(inputs.nth(1)).toHaveValue('Second input');
396
-
397
- // First input should maintain its value
398
- await expect(inputs.nth(0)).toHaveValue('First input');
399
- }
400
- });
401
- });
402
-
403
- // Performance tests
404
- test.describe('Component Performance', () => {
405
- test('components render within acceptable time', async ({ page }) => {
406
- const stories = [
407
- '/?path=/story/wl-button--default',
408
- '/?path=/story/wl-input--default',
409
- '/?path=/story/wl-select--default'
410
- ];
411
-
412
- for (const story of stories) {
413
- const startTime = Date.now();
414
- await page.goto(story);
415
- // Frame already loaded
416
- const endTime = Date.now();
417
-
418
- const renderTime = endTime - startTime;
419
- expect(renderTime).toBeLessThan(5000); // Should render within 5 seconds
420
- }
421
- });
422
-
423
- test('components handle rapid interactions', async ({ page }) => {
424
- frame = await navigateToStory(page, '/?path=/story/wl-button--default');
425
-
426
- const button = frame.locator('button.v-btn').filter({ hasNotText: 'Set string' }).first();
427
-
428
- if (await button.count() > 0) {
429
- // Rapid clicking should not cause errors
430
- for (let i = 0; i < 10; i++) {
431
- await button.click({ delay: 50 });
432
- }
433
-
434
- await expect(button).toBeVisible();
435
- }
436
- });
437
- });
1
+ import { test, expect, Frame } from '@playwright/test';
2
+ import { navigateToStory, getComponentButton, getComponentInput, getComponentElement } from './storybook-utils';
3
+
4
+ test.describe('Additional Components', () => {
5
+ let frame: Frame;
6
+
7
+ test.describe('Audio Component', () => {
8
+ test.beforeEach(async ({ page }) => {
9
+ frame = await navigateToStory(page, '/?path=/story/wl-audio--default');
10
+ }, { timeout: 45000 });
11
+
12
+ test('renders audio component', async ({ page }) => {
13
+ const audioComponent = frame.locator('.audio-component, .waveform, audio').first();
14
+ await expect(audioComponent).toBeVisible();
15
+ });
16
+
17
+ test('has audio controls', async ({ page }) => {
18
+ const playButton = frame.locator('button[aria-label*="play"], button[title*="play"], .play-button').first();
19
+ if (await playButton.count() > 0) {
20
+ await expect(playButton).toBeVisible();
21
+ await playButton.click();
22
+ }
23
+ });
24
+
25
+ test('displays waveform if present', async ({ page }) => {
26
+ const waveform = frame.locator('.waveform, canvas, svg').first();
27
+ if (await waveform.count() > 0) {
28
+ await expect(waveform).toBeVisible();
29
+ }
30
+ });
31
+ });
32
+
33
+ test.describe('Edit Field Component', () => {
34
+ test.beforeEach(async ({ page }) => {
35
+ frame = await navigateToStory(page, '/?path=/story/wl-editfield--text-field');
36
+ }, { timeout: 45000 });
37
+
38
+ test('renders edit field', async ({ page }) => {
39
+ const editField = frame.locator('.wl-edit-field, .v-input, .v-field').first();
40
+ await expect(editField).toBeVisible();
41
+ });
42
+
43
+ test('can toggle between edit and display mode', async ({ page }) => {
44
+ const editButton = frame.locator('button[aria-label*="edit"], .edit-button, [class*="edit"]').first();
45
+
46
+ if (await editButton.count() > 0) {
47
+ await editButton.click();
48
+
49
+ const input = frame.locator('input, .v-field input').first();
50
+ if (await input.count() > 0) {
51
+ await expect(input).toBeVisible();
52
+ }
53
+ }
54
+ });
55
+
56
+ test('saves changes when confirmed', async ({ page }) => {
57
+ const editButton = frame.locator('button[aria-label*="edit"], .edit-button, [class*="edit"]').first();
58
+
59
+ if (await editButton.count() > 0) {
60
+ await editButton.click();
61
+
62
+ const input = frame.locator('input, .v-field input').first();
63
+ if (await input.count() > 0) {
64
+ await input.fill('Updated text');
65
+
66
+ const saveButton = frame.locator('button[aria-label*="save"], button[aria-label*="confirm"], .save-button').first();
67
+ if (await saveButton.count() > 0) {
68
+ await saveButton.click();
69
+ } else {
70
+ // Try Enter key
71
+ await input.press('Enter');
72
+ }
73
+ }
74
+ }
75
+ });
76
+ });
77
+
78
+ test.describe('Phone Input Component', () => {
79
+ test.beforeEach(async ({ page }) => {
80
+ frame = await navigateToStory(page, '/?path=/story/wl-phoneinput--default');
81
+ }, { timeout: 45000 });
82
+
83
+ test('renders phone input with country selector', async ({ page }) => {
84
+ const phoneInput = frame.locator('.phone-input, .v-field').first();
85
+ await expect(phoneInput).toBeVisible();
86
+
87
+ const countrySelector = frame.locator('.country-select, .flag, [class*="country"]').first();
88
+ if (await countrySelector.count() > 0) {
89
+ await expect(countrySelector).toBeVisible();
90
+ }
91
+ });
92
+
93
+ test('accepts phone number input', async ({ page }) => {
94
+ // Find the actual phone number input field (not the country selector)
95
+ const phoneNumberInputs = frame.locator('input[type="tel"], input[type="text"]');
96
+ // Skip the first input which is the country selector
97
+ const phoneNumberInput = await phoneNumberInputs.count() > 1 ? phoneNumberInputs.nth(1) : phoneNumberInputs.first();
98
+
99
+ await phoneNumberInput.fill('1234567890');
100
+ await expect(phoneNumberInput).toHaveValue('1234567890');
101
+ });
102
+
103
+ test('country selector opens dropdown', async ({ page }) => {
104
+ const countrySelector = frame.locator('.country-select, .flag, [class*="country"]').first();
105
+
106
+ if (await countrySelector.count() > 0) {
107
+ await countrySelector.click();
108
+
109
+ const dropdown = frame.locator('.v-menu, .country-list, .dropdown').first();
110
+ if (await dropdown.count() > 0) {
111
+ await expect(dropdown).toBeVisible();
112
+ }
113
+ }
114
+ });
115
+ });
116
+
117
+ test.describe('TextArea Component', () => {
118
+ test.beforeEach(async ({ page }) => {
119
+ frame = await navigateToStory(page, '/?path=/story/wl-textarea--default');
120
+ }, { timeout: 45000 });
121
+
122
+ test('renders textarea', async ({ page }) => {
123
+ const textarea = frame.locator('textarea, .v-textarea').first();
124
+ await expect(textarea).toBeVisible();
125
+ });
126
+
127
+ test('accepts multi-line text input', async ({ page }) => {
128
+ const textarea = frame.locator('textarea, .v-textarea textarea').first();
129
+ const multilineText = 'Line 1\nLine 2\nLine 3';
130
+
131
+ await textarea.fill(multilineText);
132
+ await expect(textarea).toHaveValue(multilineText);
133
+ });
134
+
135
+ test('handles resize if enabled', async ({ page }) => {
136
+ const textarea = frame.locator('textarea, .v-textarea textarea').first();
137
+
138
+ // Check if resize is possible
139
+ const resizable = await textarea.evaluate((el: HTMLTextAreaElement) => {
140
+ const style = window.getComputedStyle(el);
141
+ return style.resize !== 'none';
142
+ });
143
+
144
+ if (resizable) {
145
+ // Textarea should be resizable
146
+ expect(resizable).toBeTruthy();
147
+ }
148
+ });
149
+
150
+ test('shows character count if enabled', async ({ page }) => {
151
+ const characterCount = frame.locator('.character-count, .v-counter, [class*="counter"]').first();
152
+
153
+ if (await characterCount.count() > 0) {
154
+ await expect(characterCount).toBeVisible();
155
+
156
+ const textarea = frame.locator('textarea, .v-textarea textarea').first();
157
+ await textarea.fill('Test text');
158
+
159
+ const countText = await characterCount.textContent();
160
+ expect(countText?.includes('9') || countText?.includes('Test text'.length.toString())).toBeTruthy();
161
+ }
162
+ });
163
+ });
164
+
165
+ test.describe('TickBox Component', () => {
166
+ test.beforeEach(async ({ page }) => {
167
+ frame = await navigateToStory(page, '/?path=/story/wl-tickbox--default');
168
+ }, { timeout: 45000 });
169
+
170
+ test('renders tickbox', async ({ page }) => {
171
+ const tickbox = frame.locator('.tick-box, .v-checkbox, input[type="checkbox"]').first();
172
+ await expect(tickbox).toBeVisible();
173
+ });
174
+
175
+ test('can be checked and unchecked', async ({ page }) => {
176
+ const checkbox = frame.locator('input[type="checkbox"]').first();
177
+
178
+ // Get initial state
179
+ const initiallyChecked = await checkbox.isChecked();
180
+
181
+ // Click the checkbox directly to toggle it
182
+ await checkbox.click({ force: true });
183
+ await page.waitForTimeout(500);
184
+
185
+ // Verify state changed
186
+ await expect(checkbox).toBeChecked({ checked: !initiallyChecked });
187
+
188
+ // Click again to toggle back
189
+ await checkbox.click({ force: true });
190
+ await page.waitForTimeout(500);
191
+
192
+ // Verify returned to initial state
193
+ await expect(checkbox).toBeChecked({ checked: initiallyChecked });
194
+ });
195
+
196
+ test('displays custom tick styling', async ({ page }) => {
197
+ const tickboxWrapper = frame.locator('.tick-box, .v-checkbox, label').first();
198
+ await tickboxWrapper.click({ force: true });
199
+
200
+ const tickIcon = frame.locator('.v-icon, .tick-icon, [class*="check"]').first();
201
+ if (await tickIcon.count() > 0) {
202
+ await expect(tickIcon).toBeVisible();
203
+ }
204
+ });
205
+ });
206
+
207
+ test.describe.skip('Modal Component', () => {
208
+ // Skip Modal tests as the component doesn't exist
209
+ test.beforeEach(async ({ page }) => {
210
+ frame = await navigateToStory(page, '/?path=/story/wl-modal--default');
211
+ }, { timeout: 45000 });
212
+
213
+ test('modal trigger renders', async ({ page }) => {
214
+ const trigger = frame.locator('button').first();
215
+ await expect(trigger).toBeVisible();
216
+ });
217
+
218
+ test('opens modal when triggered', async ({ page }) => {
219
+ const trigger = frame.locator('button').first();
220
+ await trigger.click();
221
+
222
+ const modal = frame.locator('.v-dialog, .modal, [role="dialog"]').first();
223
+ await expect(modal).toBeVisible();
224
+ });
225
+
226
+ test('closes modal with close button', async ({ page }) => {
227
+ const trigger = frame.locator('button').first();
228
+ await trigger.click();
229
+
230
+ const modal = frame.locator('.v-dialog, .modal, [role="dialog"]').first();
231
+ await expect(modal).toBeVisible();
232
+
233
+ const closeButton = frame.locator('button').filter({ hasText: /close|×/i }).first();
234
+ if (await closeButton.count() > 0) {
235
+ await closeButton.click();
236
+ await expect(modal).not.toBeVisible();
237
+ }
238
+ });
239
+ });
240
+
241
+ test.describe('Notification Bubble Component', () => {
242
+ test.beforeEach(async ({ page }) => {
243
+ frame = await navigateToStory(page, '/?path=/story/wl-notificationbubble--with-text');
244
+ }, { timeout: 45000 });
245
+
246
+ test('renders notification bubble', async ({ page }) => {
247
+ const notification = frame.locator('.notification-bubble, button.v-btn').first();
248
+ await expect(notification).toBeVisible();
249
+ });
250
+
251
+ test('displays notification content', async ({ page }) => {
252
+ const notification = frame.locator('.notification-bubble, button.v-btn').first();
253
+ const content = await notification.textContent();
254
+ // Check if content exists and is not empty
255
+ if (!content || content.trim() === '') {
256
+ // Try to find h4 or v-icon inside the button
257
+ const textElement = notification.locator('h4');
258
+ const iconElement = notification.locator('.v-icon');
259
+
260
+ if (await textElement.count() > 0) {
261
+ const text = await textElement.textContent();
262
+ expect(text?.trim()).toBeTruthy();
263
+ } else if (await iconElement.count() > 0) {
264
+ await expect(iconElement).toBeVisible();
265
+ } else {
266
+ // At least the button should be visible
267
+ await expect(notification).toBeVisible();
268
+ }
269
+ } else {
270
+ expect(content.trim()).toBeTruthy();
271
+ }
272
+ });
273
+
274
+ test('can be dismissed if dismissible', async ({ page }) => {
275
+ const dismissButton = frame.locator('button[aria-label*="dismiss"], button[aria-label*="close"], .close-button').first();
276
+
277
+ if (await dismissButton.count() > 0) {
278
+ const notification = frame.locator('.notification-bubble, .v-alert, .notification').first();
279
+ await dismissButton.click();
280
+ await expect(notification).not.toBeVisible();
281
+ }
282
+ });
283
+ });
284
+
285
+ test.describe.skip('Icon Components', () => {
286
+ // Skip individual icon tests to avoid navigation issues
287
+ const iconStories = [
288
+ '/?path=/story/wl-icons-calendar--default',
289
+ '/?path=/story/wl-icons-chair--default',
290
+ '/?path=/story/wl-icons-circle--default'
291
+ ];
292
+
293
+ iconStories.forEach((story, index) => {
294
+ test(`icon component ${index + 1} renders`, async ({ page }) => {
295
+ try {
296
+ await page.goto(story);
297
+ await page.waitForSelector('[data-testid="root"]', { timeout: 5000 });
298
+
299
+ const icon = frame.locator('svg, i, .icon, .v-icon').first();
300
+ await expect(icon).toBeVisible();
301
+ } catch (error) {
302
+ // Skip if story doesn't exist
303
+ console.log(`Icon story ${story} not found, skipping`);
304
+ }
305
+ });
306
+ });
307
+ });
308
+
309
+ test.describe('Icon Bullet Components', () => {
310
+ test.beforeEach(async ({ page }) => {
311
+ frame = await navigateToStory(page, '/?path=/story/wl-iconbullet-iconbullet--with-content');
312
+ }, { timeout: 45000 });
313
+
314
+ test('renders icon bullet', async ({ page }) => {
315
+ // Wait for content to load
316
+ await page.waitForTimeout(1000);
317
+
318
+ // Look for the IconBullet component structure (d-flex container with icon and content)
319
+ const iconBulletContainer = frame.locator('.d-flex.align-start').first();
320
+
321
+ if (await iconBulletContainer.count() > 0) {
322
+ await expect(iconBulletContainer).toBeVisible();
323
+
324
+ // Verify icon is present
325
+ const icon = iconBulletContainer.locator('.v-icon, svg').first();
326
+ if (await icon.count() > 0) {
327
+ await expect(icon).toBeVisible();
328
+ }
329
+
330
+ // Verify content is present
331
+ const content = iconBulletContainer.locator('div').nth(1);
332
+ if (await content.count() > 0) {
333
+ await expect(content).toBeVisible();
334
+ }
335
+ } else {
336
+ // Fallback: check for any visible content
337
+ const anyContent = frame.locator('body').first();
338
+ const htmlContent = await anyContent.innerHTML();
339
+ expect(htmlContent.length).toBeGreaterThan(0);
340
+ }
341
+ });
342
+
343
+ test('displays icon and content', async ({ page }) => {
344
+ const icon = frame.locator('svg, i, .icon, .v-icon').first();
345
+ if (await icon.count() > 0) {
346
+ await expect(icon).toBeVisible();
347
+ }
348
+
349
+ const content = await frame.locator('body').textContent();
350
+ expect(content?.trim()).toBeTruthy();
351
+ });
352
+
353
+ test.skip('icon bullet list renders multiple items', async ({ page }) => {
354
+ // Skip this test due to frame detach issues
355
+ await page.goto('/?path=/story/wl-iconbullet-iconbulletlist--default');
356
+
357
+ if (await frame.locator('[data-testid="root"]').count() > 0) {
358
+ const bulletItems = frame.locator('.icon-bullet, .bullet-point, .list-item');
359
+ const itemCount = await bulletItems.count();
360
+ expect(itemCount).toBeGreaterThan(0);
361
+ }
362
+ });
363
+ });
364
+
365
+ // Cross-component integration tests
366
+ test.describe('Component Integration', () => {
367
+ test('components work together in complex layouts', async ({ page }) => {
368
+ // Test with a complex story that combines multiple components
369
+ frame = await navigateToStory(page, '/?path=/story/wl-button--default');
370
+
371
+ // Test tab navigation across multiple components
372
+ await page.keyboard.press('Tab');
373
+
374
+ // Check for any focusable element
375
+ const focusableElements = frame.locator('button:visible, input:visible, select:visible, textarea:visible, a[href]:visible');
376
+ const firstFocusable = focusableElements.first();
377
+
378
+ if (await firstFocusable.count() > 0) {
379
+ await expect(firstFocusable).toBeVisible();
380
+ }
381
+ });
382
+
383
+ test('components maintain state independently', async ({ page }) => {
384
+ // Navigate to a story with multiple interactive components
385
+ frame = await navigateToStory(page, '/?path=/story/wl-input--default');
386
+
387
+ const inputs = frame.locator('input');
388
+ if (await inputs.count() > 1) {
389
+ // Fill first input
390
+ await inputs.nth(0).fill('First input');
391
+ await expect(inputs.nth(0)).toHaveValue('First input');
392
+
393
+ // Fill second input
394
+ await inputs.nth(1).fill('Second input');
395
+ await expect(inputs.nth(1)).toHaveValue('Second input');
396
+
397
+ // First input should maintain its value
398
+ await expect(inputs.nth(0)).toHaveValue('First input');
399
+ }
400
+ });
401
+ });
402
+
403
+ // Performance tests
404
+ test.describe('Component Performance', () => {
405
+ test('components render within acceptable time', async ({ page }) => {
406
+ const stories = [
407
+ '/?path=/story/wl-button--default',
408
+ '/?path=/story/wl-input--default',
409
+ '/?path=/story/wl-select--default'
410
+ ];
411
+
412
+ for (const story of stories) {
413
+ const startTime = Date.now();
414
+ await page.goto(story);
415
+ // Frame already loaded
416
+ const endTime = Date.now();
417
+
418
+ const renderTime = endTime - startTime;
419
+ expect(renderTime).toBeLessThan(5000); // Should render within 5 seconds
420
+ }
421
+ });
422
+
423
+ test('components handle rapid interactions', async ({ page }) => {
424
+ frame = await navigateToStory(page, '/?path=/story/wl-button--default');
425
+
426
+ const button = frame.locator('button.v-btn').filter({ hasNotText: 'Set string' }).first();
427
+
428
+ if (await button.count() > 0) {
429
+ // Rapid clicking should not cause errors
430
+ for (let i = 0; i < 10; i++) {
431
+ await button.click({ delay: 50 });
432
+ }
433
+
434
+ await expect(button).toBeVisible();
435
+ }
436
+ });
437
+ });
438
438
  });