@zap-wunschlachen/wl-shared-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/playwright.yml +215 -0
- package/.github/workflows/static.yml +62 -0
- package/.prettierrc +5 -0
- package/.storybook/main.ts +18 -0
- package/.storybook/preview.ts +37 -0
- package/.storybook/storyWrapper.vue +18 -0
- package/.storybook/withVuetifyTheme.decorator.ts +21 -0
- package/App.vue +95 -0
- package/README.md +56 -0
- package/heroicons.ts +75 -0
- package/index.html +19 -0
- package/package.json +66 -0
- package/playwright.config.ts +35 -0
- package/public/audio/dummy_pink_noise.wav +0 -0
- package/public/background.svg +60 -0
- package/public/javascript.svg +1 -0
- package/public/style.css +187 -0
- package/public/technologies.svg +22 -0
- package/src/assets/css/base.css +235 -0
- package/src/assets/css/variables.css +96 -0
- package/src/assets/fonts/Outfit-Black.ttf +0 -0
- package/src/assets/fonts/Outfit-Bold.ttf +0 -0
- package/src/assets/fonts/Outfit-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Outfit-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Outfit-Light.ttf +0 -0
- package/src/assets/fonts/Outfit-Medium.ttf +0 -0
- package/src/assets/fonts/Outfit-Regular.ttf +0 -0
- package/src/assets/fonts/Outfit-SemiBold.ttf +0 -0
- package/src/assets/fonts/Outfit-Thin.ttf +0 -0
- package/src/components/Accordion/Accordion.css +59 -0
- package/src/components/Accordion/AccordionGroup.vue +51 -0
- package/src/components/Accordion/AccordionItem.vue +66 -0
- package/src/components/Appointment/Card/Actions.css +30 -0
- package/src/components/Appointment/Card/Actions.vue +66 -0
- package/src/components/Appointment/Card/Card.css +49 -0
- package/src/components/Appointment/Card/Card.vue +55 -0
- package/src/components/Appointment/Card/Details.css +51 -0
- package/src/components/Appointment/Card/Details.vue +44 -0
- package/src/components/Audio/Audio.vue +188 -0
- package/src/components/Audio/Waveform.vue +118 -0
- package/src/components/Button/Button.vue +119 -0
- package/src/components/CheckBox/CheckBox.css +185 -0
- package/src/components/CheckBox/Checkbox.vue +130 -0
- package/src/components/DateInput/DateInput.css +3 -0
- package/src/components/DateInput/DateInput.vue +263 -0
- package/src/components/Dialog/Dialog.css +6 -0
- package/src/components/Dialog/Dialog.vue +29 -0
- package/src/components/EditField/EditField.css +20 -0
- package/src/components/EditField/EditField.vue +202 -0
- package/src/components/IconBullet/IconBullet.vue +86 -0
- package/src/components/IconBullet/IconBulletList.vue +41 -0
- package/src/components/Icons/Audio/CloudFailed.vue +21 -0
- package/src/components/Icons/Audio/CloudSaved.vue +22 -0
- package/src/components/Icons/Audio/Delete.vue +16 -0
- package/src/components/Icons/Audio/Pause.vue +19 -0
- package/src/components/Icons/Audio/Play.vue +16 -0
- package/src/components/Icons/CalendarNotification.vue +126 -0
- package/src/components/Icons/Chair.vue +32 -0
- package/src/components/Icons/ChairNotification.vue +35 -0
- package/src/components/Icons/Circle.vue +66 -0
- package/src/components/Icons/FavIcon.vue +22 -0
- package/src/components/Icons/FilledCircle.vue +11 -0
- package/src/components/Icons/Group3.vue +46 -0
- package/src/components/Icons/RingNotification.vue +54 -0
- package/src/components/Icons/SolidArrowRight.vue +14 -0
- package/src/components/Icons/calendar.vue +17 -0
- package/src/components/Icons/checkbox.vue +19 -0
- package/src/components/Icons/outlineChecked.vue +27 -0
- package/src/components/Icons/play.vue +6 -0
- package/src/components/Input/Input.css +187 -0
- package/src/components/Input/Input.vue +247 -0
- package/src/components/Laboratory/AppointmentCard/AppointmentCard.css +7 -0
- package/src/components/Laboratory/AppointmentCard/AppointmentCard.vue +116 -0
- package/src/components/Laboratory/ChatBoxImage/ChatBoxImage.vue +81 -0
- package/src/components/Laboratory/ChatMessage/ChatMessage.vue +113 -0
- package/src/components/Laboratory/ChatMessage/ChatMessageBadge.css +4 -0
- package/src/components/Laboratory/ChatMessage/ChatMessageBadge.vue +99 -0
- package/src/components/Laboratory/ChatNotification/ChatNotification.vue +130 -0
- package/src/components/Laboratory/DocumentCard/DocumentCard.css +3 -0
- package/src/components/Laboratory/DocumentCard/DocumentCard.vue +50 -0
- package/src/components/Laboratory/DocumentCard/DocumentCardItem.vue +53 -0
- package/src/components/Laboratory/InfoCard/InfoCard.vue +162 -0
- package/src/components/Laboratory/MainColumnsBar/MainColumnsBar.vue +102 -0
- package/src/components/Laboratory/ProgressCircle/ProgressCircle.vue +152 -0
- package/src/components/Laboratory/ProgressLinear/ProgressLinear.css +33 -0
- package/src/components/Laboratory/ProgressLinear/ProgressLinear.vue +75 -0
- package/src/components/Laboratory/SelectionColumnBar/SelectionColumnBar.vue +92 -0
- package/src/components/Laboratory/StatusNotification/StatusNotification.vue +49 -0
- package/src/components/Laboratory/TagLabel/TagLabel.vue +126 -0
- package/src/components/Laboratory/TagLabelGroup/TagLabelGroup.vue +97 -0
- package/src/components/Laboratory/TicketCard/TicketCard.css +3 -0
- package/src/components/Laboratory/TicketCard/TicketCard.vue +143 -0
- package/src/components/Laboratory/TimeLine/TimeLineEvent.css +18 -0
- package/src/components/Laboratory/TimeLine/TimeLineEvent.vue +119 -0
- package/src/components/Laboratory/TimeLine/Timeline.css +4 -0
- package/src/components/Laboratory/TimeLine/Timeline.vue +30 -0
- package/src/components/Modal/Modal.css +6 -0
- package/src/components/Modal/Modal.vue +23 -0
- package/src/components/NotificationBubble/NotificationBubble.css +4 -0
- package/src/components/NotificationBubble/NotificationBubble.vue +90 -0
- package/src/components/OtpInput/OtpInput.css +39 -0
- package/src/components/OtpInput/OtpInput.vue +144 -0
- package/src/components/PhoneInput/PhoneInput.css +32 -0
- package/src/components/PhoneInput/PhoneInput.vue +114 -0
- package/src/components/Select/Select.css +150 -0
- package/src/components/Select/Select.vue +304 -0
- package/src/components/TextArea/TextArea.css +3 -0
- package/src/components/TextArea/TextArea.vue +126 -0
- package/src/components/TickBox/TickBox.css +49 -0
- package/src/components/TickBox/TickBox.vue +126 -0
- package/src/components/index.ts +20 -0
- package/src/constants/buttonEnums.ts +0 -0
- package/src/constants/iconEnums.ts +4 -0
- package/src/i18n/i18n.ts +16 -0
- package/src/i18n/locales/de.json +19 -0
- package/src/i18n/locales/en.json +19 -0
- package/src/index.ts +31 -0
- package/src/main.ts +11 -0
- package/src/plugins/vuetify.ts +131 -0
- package/src/shims-vue.d.ts +10 -0
- package/src/stories/Accordion.stories.ts +650 -0
- package/src/stories/Audio.stories.ts +29 -0
- package/src/stories/Button.stories.ts +263 -0
- package/src/stories/CheckBox.stories.ts +348 -0
- package/src/stories/DateInput.stories.ts +54 -0
- package/src/stories/Dialog.stories.ts +147 -0
- package/src/stories/EditField.stories.ts +79 -0
- package/src/stories/IconBullet/IconBullet.stories.ts +201 -0
- package/src/stories/IconBullet/IconBulletList.stories.ts +275 -0
- package/src/stories/Input.stories.ts +351 -0
- package/src/stories/Laboratory/Cards/AppointmentCard/AppointmentCard.stories.ts +260 -0
- package/src/stories/Laboratory/Cards/DocumentCard/DocumentCard.stories.ts +176 -0
- package/src/stories/Laboratory/Cards/DocumentCard/DocumentCardItem.stories.ts +119 -0
- package/src/stories/Laboratory/Cards/InfoCard/InfoCard.stories.ts +320 -0
- package/src/stories/Laboratory/Cards/TicketCard/TicketCard.stories.ts +335 -0
- package/src/stories/Laboratory/Chat/ChatBoxImage.stories.ts +82 -0
- package/src/stories/Laboratory/Chat/ChatMessage.stories.ts +198 -0
- package/src/stories/Laboratory/Chat/ChatMessageBadge.stories.ts +204 -0
- package/src/stories/Laboratory/Chat/ChatNotification.stories.ts +144 -0
- package/src/stories/Laboratory/Chat/ProgressLinear.stories.ts +186 -0
- package/src/stories/Laboratory/Chat/StatusNotification.stories.ts +111 -0
- package/src/stories/Laboratory/MainColumnsBar.stories.ts +48 -0
- package/src/stories/Laboratory/ProgressCircle.stories.ts +261 -0
- package/src/stories/Laboratory/SelectionColumnBar.stories.ts +234 -0
- package/src/stories/Laboratory/TagLabel.stories.ts +418 -0
- package/src/stories/Laboratory/TagLabelGroup.stories.ts +234 -0
- package/src/stories/Laboratory/Timeline.stories.ts +403 -0
- package/src/stories/NotificationBubble.stories.ts +194 -0
- package/src/stories/OtpInput.stories.ts +101 -0
- package/src/stories/PhoneInput.stories.ts +53 -0
- package/src/stories/Select.stories.ts +419 -0
- package/src/stories/TextArea.stories.ts +112 -0
- package/src/stories/TickBox.stories.ts +294 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/v-icon.stories.ts +91 -0
- package/src/types/index.ts +21 -0
- package/src/vite-env.d.ts +1 -0
- package/tests/e2e/README.md +221 -0
- package/tests/e2e/accessibility.spec.ts +639 -0
- package/tests/e2e/accordion.spec.ts +42 -0
- package/tests/e2e/additional-components.spec.ts +438 -0
- package/tests/e2e/all-components.spec.ts +135 -0
- package/tests/e2e/button-fixed.spec.ts +59 -0
- package/tests/e2e/button.spec.ts +76 -0
- package/tests/e2e/checkbox.spec.ts +50 -0
- package/tests/e2e/date-input.spec.ts +46 -0
- package/tests/e2e/debug.spec.ts +52 -0
- package/tests/e2e/dialog.spec.ts +58 -0
- package/tests/e2e/input.spec.ts +55 -0
- package/tests/e2e/laboratory-components.spec.ts +321 -0
- package/tests/e2e/otp-input.spec.ts +50 -0
- package/tests/e2e/select.spec.ts +52 -0
- package/tests/e2e/storybook-utils.ts +59 -0
- package/tests/e2e/test-basic.spec.ts +34 -0
- package/tests/e2e/visual-regression.spec.ts +351 -0
- package/tests/unit/components/Accordion/AccordionGroup.spec.ts +343 -0
- package/tests/unit/components/Accordion/AccordionItem.spec.ts +384 -0
- package/tests/unit/components/Audio/Audio.spec.ts +404 -0
- package/tests/unit/components/Audio/Waveform.spec.ts +484 -0
- package/tests/unit/components/Core/Button.spec.ts +337 -0
- package/tests/unit/components/Core/Checkbox.spec.ts +545 -0
- package/tests/unit/components/Core/DateInput.spec.ts +691 -0
- package/tests/unit/components/Core/Dialog.spec.ts +486 -0
- package/tests/unit/components/Core/EditField.spec.ts +783 -0
- package/tests/unit/components/Core/Input.spec.ts +513 -0
- package/tests/unit/components/Core/Modal.spec.ts +519 -0
- package/tests/unit/components/Core/NotificationBubble.spec.ts +607 -0
- package/tests/unit/components/Core/OtpInput.spec.ts +709 -0
- package/tests/unit/components/Core/PhoneInput.spec.ts +620 -0
- package/tests/unit/components/Core/Select.spec.ts +713 -0
- package/tests/unit/components/Core/TextArea.spec.ts +566 -0
- package/tests/unit/components/Core/TickBox.spec.ts +780 -0
- package/tests/unit/components/IconBullet/IconBullet.spec.ts +357 -0
- package/tests/unit/components/IconBullet/IconBulletList.spec.ts +372 -0
- package/tests/unit/components/Icons/Audio/CloudFailed.spec.ts +109 -0
- package/tests/unit/components/Icons/Audio/CloudSaved.spec.ts +150 -0
- package/tests/unit/components/Icons/Audio/Delete.spec.ts +159 -0
- package/tests/unit/components/Icons/Audio/Pause.spec.ts +209 -0
- package/tests/unit/components/Icons/Audio/Play.spec.ts +218 -0
- package/tests/unit/components/Icons/CalendarNotification.spec.ts +187 -0
- package/tests/unit/components/Icons/Chair.spec.ts +235 -0
- package/tests/unit/components/Icons/ChairNotification.spec.ts +312 -0
- package/tests/unit/components/Icons/Circle.spec.ts +256 -0
- package/tests/unit/components/Icons/FavIcon.spec.ts +252 -0
- package/tests/unit/components/Icons/FilledCircle.spec.ts +275 -0
- package/tests/unit/components/Icons/Group3.spec.ts +356 -0
- package/tests/unit/components/Icons/RingNotification.spec.ts +394 -0
- package/tests/unit/components/Icons/calendar.spec.ts +287 -0
- package/tests/unit/components/Icons/checkbox.spec.ts +316 -0
- package/tests/unit/components/Icons/outlineChecked.spec.ts +435 -0
- package/tests/unit/components/Icons/play.spec.ts +309 -0
- package/tests/unit/components/Laboratory/AppointmentCard.spec.ts +168 -0
- package/tests/unit/components/Laboratory/ChatBoxImage.spec.ts +180 -0
- package/tests/unit/components/Laboratory/ChatMessage.spec.ts +264 -0
- package/tests/unit/components/Laboratory/ChatMessageBadge.spec.ts +283 -0
- package/tests/unit/components/Laboratory/ChatNotification.spec.ts +257 -0
- package/tests/unit/components/Laboratory/DocumentCard.spec.ts +229 -0
- package/tests/unit/components/Laboratory/DocumentCardItem.spec.ts +237 -0
- package/tests/unit/components/Laboratory/InfoCard.spec.ts +309 -0
- package/tests/unit/components/Laboratory/MainColumnsBar.spec.ts +252 -0
- package/tests/unit/components/Laboratory/ProgressCircle.spec.ts +291 -0
- package/tests/unit/components/Laboratory/ProgressLinear.spec.ts +276 -0
- package/tests/unit/components/Laboratory/SelectionColumnBar.spec.ts +289 -0
- package/tests/unit/components/Laboratory/StatusNotification.spec.ts +297 -0
- package/tests/unit/components/Laboratory/TagLabel.spec.ts +354 -0
- package/tests/unit/components/Laboratory/TagLabelGroup.spec.ts +378 -0
- package/tests/unit/components/Laboratory/TicketCard.spec.ts +352 -0
- package/tests/unit/components/Laboratory/TimeLineEvent.spec.ts +382 -0
- package/tests/unit/components/Laboratory/Timeline.spec.ts +420 -0
- package/tests/unit/constants/iconEnums.spec.ts +40 -0
- package/tests/unit/i18n/i18n.spec.ts +89 -0
- package/tests/unit/plugins/vuetify.spec.ts +221 -0
- package/tests/unit/setup.ts +190 -0
- package/tests/unit/src/components/index.spec.ts +193 -0
- package/tests/unit/src/index.spec.ts +183 -0
- package/tests/unit/src/main.spec.ts +152 -0
- package/tsconfig.json +26 -0
- package/vite.config.ts +29 -0
- package/vitest.config.ts +84 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('Button Component', () => {
|
|
4
|
+
async function getFrame(page) {
|
|
5
|
+
await page.waitForSelector('#storybook-preview-iframe', { timeout: 30000 });
|
|
6
|
+
const frame = page.frame({ url: /iframe\.html/ });
|
|
7
|
+
if (!frame) throw new Error('Frame not found');
|
|
8
|
+
await frame.waitForSelector('body', { timeout: 30000, state: 'attached' });
|
|
9
|
+
await page.waitForTimeout(1000); // Give time for Vue components to mount
|
|
10
|
+
return frame;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
test('renders default button', async ({ page }) => {
|
|
14
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--default');
|
|
15
|
+
const frame = await getFrame(page);
|
|
16
|
+
|
|
17
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
18
|
+
await expect(button).toBeVisible();
|
|
19
|
+
await expect(button).toHaveText('Button');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('can be clicked', async ({ page }) => {
|
|
23
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--default');
|
|
24
|
+
const frame = await getFrame(page);
|
|
25
|
+
|
|
26
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
27
|
+
await button.click();
|
|
28
|
+
await expect(button).toBeVisible();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test('displays prepend icon', async ({ page }) => {
|
|
32
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--with-prepend-icon');
|
|
33
|
+
const frame = await getFrame(page);
|
|
34
|
+
|
|
35
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
36
|
+
await expect(button).toBeVisible();
|
|
37
|
+
const icon = button.locator('i').first();
|
|
38
|
+
await expect(icon).toBeVisible();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test('shows loading state', async ({ page }) => {
|
|
42
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--loading-state');
|
|
43
|
+
const frame = await getFrame(page);
|
|
44
|
+
|
|
45
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
46
|
+
await expect(button).toBeVisible();
|
|
47
|
+
await expect(button).toHaveText('Loading...');
|
|
48
|
+
|
|
49
|
+
const loadingSpinner = frame.locator('.v-progress-circular').first();
|
|
50
|
+
await expect(loadingSpinner).toBeVisible();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('displays custom color', async ({ page }) => {
|
|
54
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--custom-color');
|
|
55
|
+
const frame = await getFrame(page);
|
|
56
|
+
|
|
57
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
58
|
+
await expect(button).toBeVisible();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('handles different sizes', async ({ page }) => {
|
|
62
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--small-button');
|
|
63
|
+
const frame = await getFrame(page);
|
|
64
|
+
|
|
65
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
66
|
+
await expect(button).toBeVisible();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test('supports different variants', async ({ page }) => {
|
|
70
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--outlined-variant');
|
|
71
|
+
const frame = await getFrame(page);
|
|
72
|
+
|
|
73
|
+
const button = frame.locator('button.v-btn:visible').first();
|
|
74
|
+
await expect(button).toBeVisible();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('Checkbox Component', () => {
|
|
4
|
+
async function getFrame(page) {
|
|
5
|
+
await page.waitForSelector('#storybook-preview-iframe', { timeout: 30000 });
|
|
6
|
+
const frame = page.frame({ url: /iframe\.html/ });
|
|
7
|
+
if (!frame) throw new Error('Frame not found');
|
|
8
|
+
await frame.waitForSelector('body', { timeout: 30000, state: 'attached' });
|
|
9
|
+
await page.waitForTimeout(1000); // Give time for Vue components to mount
|
|
10
|
+
return frame;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
test('renders default checkbox', async ({ page }) => {
|
|
14
|
+
await page.goto('http://localhost:7000/?path=/story/wl-checkbox--default');
|
|
15
|
+
const frame = await getFrame(page);
|
|
16
|
+
|
|
17
|
+
const checkbox = frame.locator('input[type="checkbox"]').first();
|
|
18
|
+
await expect(checkbox).toBeAttached();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('can be checked and unchecked', async ({ page }) => {
|
|
22
|
+
await page.goto('http://localhost:7000/?path=/story/wl-checkbox--default');
|
|
23
|
+
const frame = await getFrame(page);
|
|
24
|
+
|
|
25
|
+
const input = frame.locator('input[type="checkbox"]').first();
|
|
26
|
+
const label = frame.locator('label').first();
|
|
27
|
+
|
|
28
|
+
await label.click();
|
|
29
|
+
await expect(input).toBeChecked();
|
|
30
|
+
|
|
31
|
+
await label.click();
|
|
32
|
+
await expect(input).not.toBeChecked();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test('displays label', async ({ page }) => {
|
|
36
|
+
await page.goto('http://localhost:7000/?path=/story/wl-checkbox--default');
|
|
37
|
+
const frame = await getFrame(page);
|
|
38
|
+
|
|
39
|
+
const label = frame.locator('label').first();
|
|
40
|
+
await expect(label).toBeVisible();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test('handles disabled state', async ({ page }) => {
|
|
44
|
+
await page.goto('http://localhost:7000/?path=/story/wl-checkbox--disabled');
|
|
45
|
+
const frame = await getFrame(page);
|
|
46
|
+
|
|
47
|
+
const input = frame.locator('input[type="checkbox"]').first();
|
|
48
|
+
await expect(input).toBeDisabled();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('DateInput Component', () => {
|
|
4
|
+
async function getFrame(page) {
|
|
5
|
+
await page.waitForSelector('#storybook-preview-iframe', { timeout: 30000 });
|
|
6
|
+
const frame = page.frame({ url: /iframe\.html/ });
|
|
7
|
+
if (!frame) throw new Error('Frame not found');
|
|
8
|
+
await frame.waitForSelector('body', { timeout: 30000, state: 'attached' });
|
|
9
|
+
await page.waitForTimeout(1000); // Give time for Vue components to mount
|
|
10
|
+
return frame;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
test('renders date input', async ({ page }) => {
|
|
14
|
+
await page.goto('http://localhost:7000/?path=/story/wl-dateinput--default');
|
|
15
|
+
const frame = await getFrame(page);
|
|
16
|
+
|
|
17
|
+
const dateInput = frame.locator('.v-text-field, input[type="date"], input[type="text"]').first();
|
|
18
|
+
await expect(dateInput).toBeVisible();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('accepts date input', async ({ page }) => {
|
|
22
|
+
await page.goto('http://localhost:7000/?path=/story/wl-dateinput--default');
|
|
23
|
+
const frame = await getFrame(page);
|
|
24
|
+
|
|
25
|
+
const input = frame.locator('input').first();
|
|
26
|
+
await input.fill('2024-01-01');
|
|
27
|
+
await expect(input).toHaveValue(/2024|01/);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('opens date picker on icon click', async ({ page }) => {
|
|
31
|
+
await page.goto('http://localhost:7000/?path=/story/wl-dateinput--default');
|
|
32
|
+
const frame = await getFrame(page);
|
|
33
|
+
|
|
34
|
+
// Click on the native date input that overlays the icon
|
|
35
|
+
const nativeDateInput = frame.locator('input[type="date"].native-date').first();
|
|
36
|
+
if (await nativeDateInput.count() > 0) {
|
|
37
|
+
await nativeDateInput.click({ force: true });
|
|
38
|
+
// Native date picker behavior is browser-specific, so we just verify the input exists
|
|
39
|
+
await expect(nativeDateInput).toBeAttached();
|
|
40
|
+
} else {
|
|
41
|
+
// Fallback: check that the date wrapper exists
|
|
42
|
+
const dateWrapper = frame.locator('.date-wrapper').first();
|
|
43
|
+
await expect(dateWrapper).toBeVisible();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('Debug DOM Structure', () => {
|
|
4
|
+
test('inspect Storybook DOM structure', async ({ page }) => {
|
|
5
|
+
await page.goto('http://localhost:7000/?path=/story/wl-button--default');
|
|
6
|
+
|
|
7
|
+
// Wait for page load
|
|
8
|
+
await page.waitForLoadState('networkidle');
|
|
9
|
+
|
|
10
|
+
// Check what's actually in the DOM
|
|
11
|
+
const bodyContent = await page.locator('body').innerHTML();
|
|
12
|
+
console.log('Body HTML:', bodyContent.substring(0, 1000));
|
|
13
|
+
|
|
14
|
+
// Look for common Storybook selectors
|
|
15
|
+
const possibleSelectors = [
|
|
16
|
+
'#storybook-root',
|
|
17
|
+
'#root',
|
|
18
|
+
'.sb-main-padded',
|
|
19
|
+
'.docs-story',
|
|
20
|
+
'#story--wl-button--default',
|
|
21
|
+
'[data-testid]',
|
|
22
|
+
'.sb-show-main',
|
|
23
|
+
'#storybook-preview-iframe'
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
for (const selector of possibleSelectors) {
|
|
27
|
+
const exists = await page.locator(selector).count();
|
|
28
|
+
console.log(`${selector}: ${exists > 0 ? 'EXISTS' : 'NOT FOUND'} (${exists} elements)`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Check if we're in an iframe
|
|
32
|
+
const frames = page.frames();
|
|
33
|
+
console.log(`Number of frames: ${frames.length}`);
|
|
34
|
+
|
|
35
|
+
for (let i = 0; i < frames.length; i++) {
|
|
36
|
+
const frame = frames[i];
|
|
37
|
+
const frameUrl = frame.url();
|
|
38
|
+
console.log(`Frame ${i}: ${frameUrl}`);
|
|
39
|
+
|
|
40
|
+
if (frameUrl.includes('iframe.html')) {
|
|
41
|
+
console.log('Found iframe frame!');
|
|
42
|
+
|
|
43
|
+
// Check content inside iframe
|
|
44
|
+
const iframeContent = await frame.locator('body').count();
|
|
45
|
+
console.log(`Iframe body elements: ${iframeContent}`);
|
|
46
|
+
|
|
47
|
+
const button = await frame.locator('button').count();
|
|
48
|
+
console.log(`Buttons in iframe: ${button}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('Dialog Component', () => {
|
|
4
|
+
async function getFrame(page) {
|
|
5
|
+
await page.waitForSelector('#storybook-preview-iframe', { timeout: 30000 });
|
|
6
|
+
const frame = page.frame({ url: /iframe\.html/ });
|
|
7
|
+
if (!frame) throw new Error('Frame not found');
|
|
8
|
+
await frame.waitForSelector('body', { timeout: 30000, state: 'attached' });
|
|
9
|
+
await page.waitForTimeout(1000); // Give time for Vue components to mount
|
|
10
|
+
return frame;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
test('renders trigger button', async ({ page }) => {
|
|
14
|
+
await page.goto('http://localhost:7000/?path=/story/wl-dialog--default-dialog');
|
|
15
|
+
const frame = await getFrame(page);
|
|
16
|
+
|
|
17
|
+
// Look for the button with the specific text
|
|
18
|
+
const trigger = frame.locator('button:has-text("Neuen Entwurf erstellen")').first();
|
|
19
|
+
await expect(trigger).toBeVisible();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('opens dialog on trigger click', async ({ page }) => {
|
|
23
|
+
await page.goto('http://localhost:7000/?path=/story/wl-dialog--default-dialog');
|
|
24
|
+
const frame = await getFrame(page);
|
|
25
|
+
|
|
26
|
+
// Look for the button with the specific text
|
|
27
|
+
const trigger = frame.locator('button:has-text("Neuen Entwurf erstellen")').first();
|
|
28
|
+
await trigger.click();
|
|
29
|
+
|
|
30
|
+
await page.waitForTimeout(500);
|
|
31
|
+
const dialog = page.locator('.v-dialog, [role="dialog"], .v-overlay--active').first();
|
|
32
|
+
if (await dialog.count() > 0) {
|
|
33
|
+
await expect(dialog).toBeVisible();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('closes dialog with close button', async ({ page }) => {
|
|
38
|
+
await page.goto('http://localhost:7000/?path=/story/wl-dialog--default-dialog');
|
|
39
|
+
const frame = await getFrame(page);
|
|
40
|
+
|
|
41
|
+
// Look for the button with the specific text
|
|
42
|
+
const trigger = frame.locator('button:has-text("Neuen Entwurf erstellen")').first();
|
|
43
|
+
await trigger.click();
|
|
44
|
+
|
|
45
|
+
await page.waitForTimeout(500);
|
|
46
|
+
const dialog = page.locator('.v-dialog, [role="dialog"], .v-overlay--active').first();
|
|
47
|
+
if (await dialog.count() > 0) {
|
|
48
|
+
// Look for 'Nein' button which closes the dialog
|
|
49
|
+
const closeButton = page.locator('button:has-text("Nein")').first();
|
|
50
|
+
if (await closeButton.count() > 0) {
|
|
51
|
+
await closeButton.click();
|
|
52
|
+
await page.waitForTimeout(500);
|
|
53
|
+
const dialogAfterClose = page.locator('.v-dialog:visible, [role="dialog"]:visible').first();
|
|
54
|
+
await expect(dialogAfterClose).toHaveCount(0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('Input Component', () => {
|
|
4
|
+
async function getFrame(page) {
|
|
5
|
+
await page.waitForSelector('#storybook-preview-iframe', { timeout: 30000 });
|
|
6
|
+
const frame = page.frame({ url: /iframe\.html/ });
|
|
7
|
+
if (!frame) throw new Error('Frame not found');
|
|
8
|
+
await frame.waitForSelector('body', { timeout: 30000, state: 'attached' });
|
|
9
|
+
await page.waitForTimeout(1000); // Give time for Vue components to mount
|
|
10
|
+
return frame;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
test('renders default input', async ({ page }) => {
|
|
14
|
+
await page.goto('http://localhost:7000/?path=/story/wl-input--default');
|
|
15
|
+
const frame = await getFrame(page);
|
|
16
|
+
|
|
17
|
+
const input = frame.locator('input:visible').first();
|
|
18
|
+
await expect(input).toBeVisible();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('accepts text input', async ({ page }) => {
|
|
22
|
+
await page.goto('http://localhost:7000/?path=/story/wl-input--default');
|
|
23
|
+
const frame = await getFrame(page);
|
|
24
|
+
|
|
25
|
+
const input = frame.locator('input:visible').first();
|
|
26
|
+
await input.fill('Test input');
|
|
27
|
+
await expect(input).toHaveValue('Test input');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('shows placeholder text', async ({ page }) => {
|
|
31
|
+
await page.goto('http://localhost:7000/?path=/story/wl-input--default');
|
|
32
|
+
const frame = await getFrame(page);
|
|
33
|
+
|
|
34
|
+
const input = frame.locator('input:visible').first();
|
|
35
|
+
await expect(input).toBeVisible();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('displays error state', async ({ page }) => {
|
|
39
|
+
await page.goto('http://localhost:7000/?path=/story/wl-input--error');
|
|
40
|
+
const frame = await getFrame(page);
|
|
41
|
+
|
|
42
|
+
const errorMessage = frame.locator('.v-messages__message, .error--text').first();
|
|
43
|
+
if (await errorMessage.count() > 0) {
|
|
44
|
+
await expect(errorMessage).toBeVisible();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test('handles disabled state', async ({ page }) => {
|
|
49
|
+
await page.goto('http://localhost:7000/?path=/story/wl-input--disabled');
|
|
50
|
+
const frame = await getFrame(page);
|
|
51
|
+
|
|
52
|
+
const input = frame.locator('input').first();
|
|
53
|
+
await expect(input).toBeDisabled();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { test, expect, Frame } from '@playwright/test';
|
|
2
|
+
import { navigateToStory } from './storybook-utils';
|
|
3
|
+
|
|
4
|
+
test.describe('Laboratory Components', () => {
|
|
5
|
+
let frame: Frame;
|
|
6
|
+
|
|
7
|
+
test.describe('Appointment Card', () => {
|
|
8
|
+
test.beforeEach(async ({ page }) => {
|
|
9
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-cards-appointmentcard--draft-status');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('renders appointment card', async ({ page }) => {
|
|
13
|
+
const card = frame.locator('.appointment-card').first();
|
|
14
|
+
await expect(card).toBeVisible();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('displays appointment information', async ({ page }) => {
|
|
18
|
+
const card = frame.locator('.appointment-card').first();
|
|
19
|
+
const cardText = await card.textContent();
|
|
20
|
+
expect(cardText?.trim()).toBeTruthy();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test('is clickable', async ({ page }) => {
|
|
24
|
+
const card = frame.locator('.appointment-card').first();
|
|
25
|
+
await card.click();
|
|
26
|
+
// Should not throw errors
|
|
27
|
+
await expect(card).toBeVisible();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test.describe('Document Card', () => {
|
|
32
|
+
test.beforeEach(async ({ page }) => {
|
|
33
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-cards-documentcard-documentcard--default');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('renders document card', async ({ page }) => {
|
|
37
|
+
const card = frame.locator('.v-card').first();
|
|
38
|
+
await expect(card).toBeVisible();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test('displays document information', async ({ page }) => {
|
|
42
|
+
const card = frame.locator('.v-card').first();
|
|
43
|
+
const cardText = await card.textContent();
|
|
44
|
+
expect(cardText?.trim()).toBeTruthy();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test.describe('Info Card', () => {
|
|
49
|
+
test.beforeEach(async ({ page }) => {
|
|
50
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-cards-infocard--draft-done');
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('renders info card', async ({ page }) => {
|
|
54
|
+
const card = frame.locator('.info-card, .v-card').first();
|
|
55
|
+
await expect(card).toBeVisible();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('displays information content', async ({ page }) => {
|
|
59
|
+
const card = frame.locator('.info-card, .v-card').first();
|
|
60
|
+
const cardText = await card.textContent();
|
|
61
|
+
expect(cardText?.trim()).toBeTruthy();
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test.describe('Ticket Card', () => {
|
|
66
|
+
test.beforeEach(async ({ page }) => {
|
|
67
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-cards-ticketcard--default');
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('renders ticket card', async ({ page }) => {
|
|
71
|
+
const card = frame.locator('.ticket-card, .v-card').first();
|
|
72
|
+
await expect(card).toBeVisible();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('has interactive elements', async ({ page }) => {
|
|
76
|
+
const card = frame.locator('.ticket-card, .v-card').first();
|
|
77
|
+
await card.click();
|
|
78
|
+
await expect(card).toBeVisible();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test.describe('Chat Message', () => {
|
|
83
|
+
test.beforeEach(async ({ page }) => {
|
|
84
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-chat-chatmessage--income-message');
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
test('renders chat message', async ({ page }) => {
|
|
88
|
+
const message = frame.locator('.v-alert').first();
|
|
89
|
+
await expect(message).toBeVisible();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test('displays message content', async ({ page }) => {
|
|
93
|
+
const message = frame.locator('.v-alert').first();
|
|
94
|
+
const messageText = await message.textContent();
|
|
95
|
+
expect(messageText?.trim()).toBeTruthy();
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test.describe('Chat Notification', () => {
|
|
100
|
+
test.beforeEach(async ({ page }) => {
|
|
101
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-chat-chatnotification--empty');
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
test('renders chat notification', async ({ page }) => {
|
|
105
|
+
const notification = frame.locator('.d-flex.flex-column').first();
|
|
106
|
+
await expect(notification).toBeVisible();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test('is dismissible if enabled', async ({ page }) => {
|
|
110
|
+
const closeButton = frame.locator('button[aria-label*="close"], .close-button, [class*="close"]').first();
|
|
111
|
+
|
|
112
|
+
if (await closeButton.count() > 0) {
|
|
113
|
+
await closeButton.click();
|
|
114
|
+
await page.waitForTimeout(500);
|
|
115
|
+
const notification = frame.locator('.d-flex.flex-column').first();
|
|
116
|
+
// Check if notification still exists but might be hidden
|
|
117
|
+
const isVisible = await notification.isVisible().catch(() => false);
|
|
118
|
+
expect(isVisible).toBeFalsy();
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test.describe('Progress Circle', () => {
|
|
124
|
+
test.beforeEach(async ({ page }) => {
|
|
125
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-progresscircle--default');
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test('renders progress circle', async ({ page }) => {
|
|
129
|
+
const progressCircle = frame.locator('.progress-circle, .v-progress-circular, svg').first();
|
|
130
|
+
await expect(progressCircle).toBeVisible();
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
test('displays progress value', async ({ page }) => {
|
|
134
|
+
const progressText = frame.locator('.progress-text, text, .progress-value');
|
|
135
|
+
|
|
136
|
+
if (await progressText.count() > 0) {
|
|
137
|
+
const text = await progressText.first().textContent();
|
|
138
|
+
expect(text?.trim()).toBeTruthy();
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
test.describe('Progress Linear', () => {
|
|
144
|
+
test.beforeEach(async ({ page }) => {
|
|
145
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-chat-progresslinear--default');
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
test('renders progress linear', async ({ page }) => {
|
|
149
|
+
const progressLinear = frame.locator('.progress-linear, .v-progress-linear').first();
|
|
150
|
+
await expect(progressLinear).toBeVisible();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
test('shows progress animation', async ({ page }) => {
|
|
154
|
+
const progressBar = frame.locator('.v-progress-linear__determinate, .v-progress-linear__buffer').first();
|
|
155
|
+
|
|
156
|
+
if (await progressBar.count() > 0) {
|
|
157
|
+
const width = await progressBar.evaluate((el) => el.style.width || getComputedStyle(el).width);
|
|
158
|
+
expect(width).toBeTruthy();
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
test.describe('Tag Label', () => {
|
|
164
|
+
test.beforeEach(async ({ page }) => {
|
|
165
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-taglabel--draft');
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
test('renders tag label', async ({ page }) => {
|
|
169
|
+
const tag = frame.locator('button.v-btn').first();
|
|
170
|
+
await expect(tag).toBeVisible();
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
test('displays tag text', async ({ page }) => {
|
|
174
|
+
const tag = frame.locator('button.v-btn').first();
|
|
175
|
+
const tagText = await tag.textContent();
|
|
176
|
+
expect(tagText?.trim()).toBeTruthy();
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test('is clickable if interactive', async ({ page }) => {
|
|
180
|
+
const tag = frame.locator('button.v-btn').first();
|
|
181
|
+
await tag.click({ force: true }); // Force click as button may be readonly
|
|
182
|
+
await expect(tag).toBeVisible();
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
test.describe('Tag Label Group', () => {
|
|
187
|
+
test.beforeEach(async ({ page }) => {
|
|
188
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-taglabelgroup--default');
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
test('renders multiple tags', async ({ page }) => {
|
|
192
|
+
const tags = frame.locator('button.v-btn');
|
|
193
|
+
const tagCount = await tags.count();
|
|
194
|
+
expect(tagCount).toBeGreaterThan(0);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
test('all tags are visible', async ({ page }) => {
|
|
198
|
+
const tags = frame.locator('button.v-btn');
|
|
199
|
+
const firstTag = tags.first();
|
|
200
|
+
await expect(firstTag).toBeVisible();
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
test.describe('Timeline', () => {
|
|
205
|
+
test.beforeEach(async ({ page }) => {
|
|
206
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-timeline--default-timeline');
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
test('renders timeline component', async ({ page }) => {
|
|
210
|
+
const timeline = frame.locator('.timeline, .v-timeline').first();
|
|
211
|
+
await expect(timeline).toBeVisible();
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
test('displays timeline events', async ({ page }) => {
|
|
215
|
+
const timelineItems = frame.locator('.timeline-item, .v-timeline-item');
|
|
216
|
+
const itemCount = await timelineItems.count();
|
|
217
|
+
expect(itemCount).toBeGreaterThan(0);
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
test('timeline events have content', async ({ page }) => {
|
|
221
|
+
const timelineItem = frame.locator('.timeline-item, .v-timeline-item').first();
|
|
222
|
+
const itemText = await timelineItem.textContent();
|
|
223
|
+
expect(itemText?.trim()).toBeTruthy();
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
test.describe('Status Notification', () => {
|
|
228
|
+
test.beforeEach(async ({ page }) => {
|
|
229
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-chat-statusnotification--default');
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test('renders status notification', async ({ page }) => {
|
|
233
|
+
const notification = frame.locator('.d-flex.flex-column').first();
|
|
234
|
+
await expect(notification).toBeVisible();
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
test('displays status message', async ({ page }) => {
|
|
238
|
+
const notification = frame.locator('.d-flex.flex-column').first();
|
|
239
|
+
const notificationText = await notification.textContent();
|
|
240
|
+
expect(notificationText?.trim()).toBeTruthy();
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
test.describe('Main Columns Bar', () => {
|
|
245
|
+
test.beforeEach(async ({ page }) => {
|
|
246
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-maincolumnsbar--default');
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
test('renders columns bar', async ({ page }) => {
|
|
250
|
+
const columnsBar = frame.locator('.d-flex.flex-row.justify-space-between').first();
|
|
251
|
+
await expect(columnsBar).toBeVisible();
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
test('has interactive elements', async ({ page }) => {
|
|
255
|
+
const buttons = frame.locator('button.v-btn').filter({ hasNotText: 'Set string' });
|
|
256
|
+
if (await buttons.count() > 0) {
|
|
257
|
+
const firstButton = buttons.first();
|
|
258
|
+
await firstButton.click();
|
|
259
|
+
await expect(firstButton).toBeVisible();
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
test.describe('Selection Column Bar', () => {
|
|
265
|
+
test.beforeEach(async ({ page }) => {
|
|
266
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-selectioncolumnbar--default');
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
test('renders selection column bar', async ({ page }) => {
|
|
270
|
+
const selectionBar = frame.locator('.v-sheet').first();
|
|
271
|
+
await expect(selectionBar).toBeVisible();
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
test('handles selection interactions', async ({ page }) => {
|
|
275
|
+
const selectableItems = frame.locator('button.v-btn').filter({ hasNotText: 'Set string' });
|
|
276
|
+
if (await selectableItems.count() > 0) {
|
|
277
|
+
const firstItem = selectableItems.first();
|
|
278
|
+
await firstItem.click();
|
|
279
|
+
await expect(firstItem).toBeVisible();
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
test.describe('Chat Box Image', () => {
|
|
285
|
+
test.beforeEach(async ({ page }) => {
|
|
286
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-chat-chatboximage--with-1-image');
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
test('renders chat box image', async ({ page }) => {
|
|
290
|
+
const chatBox = frame.locator('.chat-box-image, .v-img, img').first();
|
|
291
|
+
await expect(chatBox).toBeVisible();
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
test('image is accessible', async ({ page }) => {
|
|
295
|
+
const image = frame.locator('img').first();
|
|
296
|
+
if (await image.count() > 0) {
|
|
297
|
+
const src = await image.getAttribute('src');
|
|
298
|
+
expect(src).toBeTruthy();
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
test.describe('Chat Message Badge', () => {
|
|
304
|
+
test.beforeEach(async ({ page }) => {
|
|
305
|
+
frame = await navigateToStory(page, '/?path=/story/wl-laboratory-chat-chatmessagebadge--default');
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
test('renders message badge', async ({ page }) => {
|
|
309
|
+
const badge = frame.locator('.message-badge, .v-badge').first();
|
|
310
|
+
await expect(badge).toBeVisible();
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
test('displays badge content', async ({ page }) => {
|
|
314
|
+
const badgeContent = frame.locator('.v-badge__badge, .badge-content, .v-badge');
|
|
315
|
+
if (await badgeContent.count() > 0) {
|
|
316
|
+
const badge = frame.locator('.v-badge').first();
|
|
317
|
+
await expect(badge).toBeVisible();
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
});
|