@digigov/ui 2.0.0-aefd0709 → 2.0.0-b15d5d44
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/cjs/feedback/ErrorSummary/ErrorSummary.stories/index.js +3 -0
- package/cjs/feedback/ErrorSummary/ErrorSummary.stories.js.map +2 -2
- package/cjs/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput/index.js +49 -0
- package/cjs/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput.js.map +7 -0
- package/cjs/i18n/index.js +18 -1
- package/cjs/i18n/index.js.map +2 -2
- package/cjs/i18n/locales/el/index.js +18 -1
- package/cjs/i18n/locales/el.js.map +2 -2
- package/cjs/i18n/locales/en/index.js +25 -2
- package/cjs/i18n/locales/en.js.map +2 -2
- package/cjs/lazy/index.js +330 -1650
- package/cjs/lazy.js.map +3 -3
- package/cjs/registry/index.js +885 -501
- package/cjs/registry.js.map +3 -3
- package/cjs/utils/hooks/useScreen/index.js +1 -1
- package/cjs/utils/hooks/useScreen.js.map +2 -2
- package/feedback/ErrorSummary/ErrorSummary.stories/index.js +2 -0
- package/feedback/ErrorSummary/ErrorSummary.stories.d.ts +1 -0
- package/feedback/ErrorSummary/ErrorSummary.stories.js.map +2 -2
- package/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput/index.js +16 -0
- package/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput/package.json +6 -0
- package/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput.d.ts +3 -0
- package/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput.js.map +7 -0
- package/i18n/index.js +18 -1
- package/i18n/index.js.map +2 -2
- package/i18n/locales/el/index.js +18 -1
- package/i18n/locales/el.d.ts +17 -0
- package/i18n/locales/el.js.map +2 -2
- package/i18n/locales/en/index.js +25 -2
- package/i18n/locales/en.d.ts +23 -0
- package/i18n/locales/en.js.map +2 -2
- package/index.js +1 -1
- package/lazy/index.js +332 -1656
- package/package.json +5 -5
- package/registry/index.js +960 -576
- package/src/app/BannerContainer/index.test.tsx +10 -11
- package/src/app/Footer/index.test.tsx +31 -32
- package/src/app/Header/index.test.tsx +22 -23
- package/src/app/Loader/index.test.tsx +13 -14
- package/src/app/Masthead/index.test.tsx +19 -20
- package/src/app/Modal/index.test.tsx +25 -26
- package/src/app/NotFound/index.test.tsx +10 -11
- package/src/app/Panel/index.test.tsx +10 -11
- package/src/app/PhaseBannerHeader/index.test.tsx +10 -11
- package/src/app/QrCodeViewer/index.test.tsx +13 -14
- package/src/app/Skeleton/index.test.tsx +34 -35
- package/src/content/Accordion/index.test.tsx +19 -20
- package/src/content/Blockquote/index.test.tsx +13 -14
- package/src/content/Card/index.test.tsx +40 -41
- package/src/content/Chip/index.test.tsx +22 -23
- package/src/content/Details/index.test.tsx +10 -11
- package/src/content/List/index.test.tsx +25 -26
- package/src/content/Markdown/index.test.tsx +10 -11
- package/src/content/SafeHTML/index.test.tsx +10 -11
- package/src/content/StepNav/index.test.tsx +22 -23
- package/src/content/SummaryList/index.test.tsx +31 -32
- package/src/content/Table/index.test.tsx +62 -63
- package/src/content/TaskList/index.test.tsx +13 -14
- package/src/content/Timeline/index.test.tsx +13 -14
- package/src/feedback/CopyToClipboard/index.test.tsx +16 -17
- package/src/feedback/ErrorSummary/ErrorSummary.stories.js +1 -0
- package/src/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput.tsx +47 -0
- package/src/feedback/ErrorSummary/index.test.tsx +29 -26
- package/src/feedback/NotificationBanner/index.test.tsx +16 -17
- package/src/feedback/PhaseBanner/index.test.tsx +13 -14
- package/src/feedback/WarningText/index.test.tsx +16 -17
- package/src/form/AutoComplete/index.test.tsx +37 -38
- package/src/form/Button/index.test.tsx +43 -44
- package/src/form/Checkbox/index.test.tsx +37 -38
- package/src/form/DateInputContainer/index.test.tsx +22 -23
- package/src/form/ErrorMessage/index.test.tsx +16 -17
- package/src/form/FileUpload/index.test.tsx +13 -14
- package/src/form/RadioContainer/index.test.tsx +37 -38
- package/src/form/SearchContainer/index.test.tsx +10 -11
- package/src/form/SelectContainer/index.test.tsx +19 -20
- package/src/form/SingleCharacterInputs/index.test.tsx +20 -24
- package/src/form/TextArea/index.test.tsx +31 -32
- package/src/form/TextInput/index.test.tsx +37 -38
- package/src/i18n/index.tsx +14 -1
- package/src/i18n/locales/el.ts +22 -0
- package/src/i18n/locales/en.ts +23 -0
- package/src/layouts/Basic/index.test.tsx +19 -20
- package/src/layouts/Grid/index.test.tsx +16 -17
- package/src/layouts/Screen/index.test.tsx +19 -20
- package/src/layouts/Stack/index.test.tsx +25 -26
- package/src/lazy.js +330 -1650
- package/src/navigation/BackLink/index.test.tsx +10 -11
- package/src/navigation/BackToTopLink/index.test.tsx +13 -14
- package/src/navigation/Breadcrumbs/index.test.tsx +22 -23
- package/src/navigation/Drawer/index.test.tsx +16 -17
- package/src/navigation/Dropdown/index.test.tsx +40 -41
- package/src/navigation/Link/index.test.tsx +28 -29
- package/src/navigation/NavList/index.test.tsx +34 -35
- package/src/navigation/Pagination/index.test.tsx +28 -29
- package/src/navigation/SkipLink/index.test.tsx +10 -11
- package/src/navigation/Tabs/index.test.tsx +19 -20
- package/src/registry.js +1026 -701
- package/src/typography/CodeBlock/index.test.tsx +19 -20
- package/src/typography/Heading/index.test.tsx +10 -11
- package/src/typography/HeadingCaption/index.test.tsx +13 -14
- package/src/typography/Hint/index.test.tsx +13 -14
- package/src/typography/NormalText/index.test.tsx +19 -20
- package/src/typography/Paragraph/index.test.tsx +22 -23
- package/src/utils/VisuallyHidden/index.test.tsx +10 -11
- package/src/utils/hooks/useScreen.ts +2 -3
- package/utils/hooks/useScreen/index.js +1 -1
- package/utils/hooks/useScreen.js.map +2 -2
- package/cjs/test-utils/delay/index.js +0 -35
- package/cjs/test-utils/delay.js.map +0 -7
- package/lazy.d.ts +0 -361
- package/lazy.js.map +0 -7
- package/registry.d.ts +0 -315
- package/registry.js.map +0 -7
- package/src/test-utils/delay.ts +0 -9
- package/test-utils/delay/index.js +0 -12
- package/test-utils/delay/package.json +0 -6
- package/test-utils/delay.d.ts +0 -2
- package/test-utils/delay.js.map +0 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { DarkVariant } from '@digigov/ui/content/Table/__stories__/DarkVariant';
|
|
4
5
|
import { DarkVariantWithVerticalHeaders } from '@digigov/ui/content/Table/__stories__/DarkVariantWithVerticalHeaders';
|
|
5
6
|
import { Default } from '@digigov/ui/content/Table/__stories__/Default';
|
|
@@ -18,75 +19,73 @@ import { WithFloatingScroll } from '@digigov/ui/content/Table/__stories__/WithFl
|
|
|
18
19
|
import { WithLoader } from '@digigov/ui/content/Table/__stories__/WithLoader';
|
|
19
20
|
import { WithSortFilters } from '@digigov/ui/content/Table/__stories__/WithSortFilters';
|
|
20
21
|
import { ZebraProp } from '@digigov/ui/content/Table/__stories__/ZebraProp';
|
|
21
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
22
22
|
const SCREENSHOT_DELAY = 2_000;
|
|
23
|
-
const delay =
|
|
23
|
+
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
24
24
|
|
|
25
25
|
test('renders the All Table variants', async ({ mount, page }) => {
|
|
26
26
|
await mount(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</
|
|
83
|
-
|
|
27
|
+
|
|
28
|
+
<div>
|
|
29
|
+
<TestVariant title="DarkVariant">
|
|
30
|
+
<DarkVariant />
|
|
31
|
+
</TestVariant>
|
|
32
|
+
<TestVariant title="DarkVariantWithVerticalHeaders">
|
|
33
|
+
<DarkVariantWithVerticalHeaders />
|
|
34
|
+
</TestVariant>
|
|
35
|
+
<TestVariant title="Default">
|
|
36
|
+
<Default />
|
|
37
|
+
</TestVariant>
|
|
38
|
+
<TestVariant title="DefinedWidth">
|
|
39
|
+
<DefinedWidth />
|
|
40
|
+
</TestVariant>
|
|
41
|
+
<TestVariant title="Dense">
|
|
42
|
+
<Dense />
|
|
43
|
+
</TestVariant>
|
|
44
|
+
<TestVariant title="Full">
|
|
45
|
+
<Full />
|
|
46
|
+
</TestVariant>
|
|
47
|
+
<TestVariant title="MultipleProps">
|
|
48
|
+
<MultipleProps />
|
|
49
|
+
</TestVariant>
|
|
50
|
+
<TestVariant title="NoData">
|
|
51
|
+
<NoData />
|
|
52
|
+
</TestVariant>
|
|
53
|
+
<TestVariant title="NumericDataType">
|
|
54
|
+
<NumericDataType />
|
|
55
|
+
</TestVariant>
|
|
56
|
+
<TestVariant title="RowColors">
|
|
57
|
+
<RowColors />
|
|
58
|
+
</TestVariant>
|
|
59
|
+
<TestVariant title="Stacked">
|
|
60
|
+
<Stacked />
|
|
61
|
+
</TestVariant>
|
|
62
|
+
<TestVariant title="TableCaptions">
|
|
63
|
+
<TableCaptions />
|
|
64
|
+
</TestVariant>
|
|
65
|
+
<TestVariant title="VerticalBorders">
|
|
66
|
+
<VerticalBorders />
|
|
67
|
+
</TestVariant>
|
|
68
|
+
<TestVariant title="VerticalHeaders">
|
|
69
|
+
<VerticalHeaders />
|
|
70
|
+
</TestVariant>
|
|
71
|
+
<TestVariant title="WithFloatingScroll">
|
|
72
|
+
<WithFloatingScroll />
|
|
73
|
+
</TestVariant>
|
|
74
|
+
<TestVariant title="WithLoader">
|
|
75
|
+
<WithLoader />
|
|
76
|
+
</TestVariant>
|
|
77
|
+
<TestVariant title="WithSortFilters">
|
|
78
|
+
<WithSortFilters />
|
|
79
|
+
</TestVariant>
|
|
80
|
+
<TestVariant title="ZebraProp">
|
|
81
|
+
<ZebraProp />
|
|
82
|
+
</TestVariant>
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
84
85
|
await page.evaluate(() => document.fonts.ready);
|
|
85
86
|
await delay(SCREENSHOT_DELAY);
|
|
86
87
|
|
|
87
|
-
const screenshot = await page.screenshot({
|
|
88
|
-
fullPage: true,
|
|
89
|
-
animations: 'disabled',
|
|
90
|
-
});
|
|
88
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
91
89
|
expect(screenshot).toMatchSnapshot();
|
|
92
90
|
});
|
|
91
|
+
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Default } from '@digigov/ui/content/TaskList/__stories__/Default';
|
|
4
5
|
import { Dense } from '@digigov/ui/content/TaskList/__stories__/Dense';
|
|
5
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
6
6
|
|
|
7
7
|
test('renders the All TaskList variants', async ({ mount, page }) => {
|
|
8
8
|
await mount(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</
|
|
17
|
-
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<TestVariant title="Default">
|
|
12
|
+
<Default />
|
|
13
|
+
</TestVariant>
|
|
14
|
+
<TestVariant title="Dense">
|
|
15
|
+
<Dense />
|
|
16
|
+
</TestVariant>
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
18
19
|
await page.evaluate(() => document.fonts.ready);
|
|
19
20
|
|
|
20
|
-
const screenshot = await page.screenshot({
|
|
21
|
-
fullPage: true,
|
|
22
|
-
animations: 'disabled',
|
|
23
|
-
});
|
|
21
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
24
22
|
expect(screenshot).toMatchSnapshot();
|
|
25
23
|
});
|
|
24
|
+
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Default } from '@digigov/ui/content/Timeline/__stories__/Default';
|
|
4
5
|
import { Dense } from '@digigov/ui/content/Timeline/__stories__/Dense';
|
|
5
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
6
6
|
|
|
7
7
|
test('renders the All Timeline variants', async ({ mount, page }) => {
|
|
8
8
|
await mount(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</
|
|
17
|
-
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<TestVariant title="Default">
|
|
12
|
+
<Default />
|
|
13
|
+
</TestVariant>
|
|
14
|
+
<TestVariant title="Dense">
|
|
15
|
+
<Dense />
|
|
16
|
+
</TestVariant>
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
18
19
|
await page.evaluate(() => document.fonts.ready);
|
|
19
20
|
|
|
20
|
-
const screenshot = await page.screenshot({
|
|
21
|
-
fullPage: true,
|
|
22
|
-
animations: 'disabled',
|
|
23
|
-
});
|
|
21
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
24
22
|
expect(screenshot).toMatchSnapshot();
|
|
25
23
|
});
|
|
24
|
+
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Banner } from '@digigov/ui/feedback/CopyToClipboard/__stories__/Banner';
|
|
4
5
|
import { Default } from '@digigov/ui/feedback/CopyToClipboard/__stories__/Default';
|
|
5
6
|
import { Dense } from '@digigov/ui/feedback/CopyToClipboard/__stories__/Dense';
|
|
6
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
7
7
|
|
|
8
8
|
test('renders the All CopyToClipboard variants', async ({ mount, page }) => {
|
|
9
9
|
await mount(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</
|
|
21
|
-
|
|
10
|
+
|
|
11
|
+
<div>
|
|
12
|
+
<TestVariant title="Banner">
|
|
13
|
+
<Banner />
|
|
14
|
+
</TestVariant>
|
|
15
|
+
<TestVariant title="Default">
|
|
16
|
+
<Default />
|
|
17
|
+
</TestVariant>
|
|
18
|
+
<TestVariant title="Dense">
|
|
19
|
+
<Dense />
|
|
20
|
+
</TestVariant>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
22
23
|
await page.evaluate(() => document.fonts.ready);
|
|
23
24
|
|
|
24
|
-
const screenshot = await page.screenshot({
|
|
25
|
-
fullPage: true,
|
|
26
|
-
animations: 'disabled',
|
|
27
|
-
});
|
|
25
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
28
26
|
expect(screenshot).toMatchSnapshot();
|
|
29
27
|
});
|
|
28
|
+
|
|
@@ -12,4 +12,5 @@ export { Dense } from '@digigov/ui/feedback/ErrorSummary/__stories__/Dense';
|
|
|
12
12
|
export { LinkedToInput } from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToInput';
|
|
13
13
|
export { LinkedToField } from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToField';
|
|
14
14
|
export { LinkedToCheckbox } from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToCheckbox';
|
|
15
|
+
export { ErrorGroupLinkedToInput } from '@digigov/ui/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput';
|
|
15
16
|
export { WithBackLinkAndButton } from '@digigov/ui/feedback/ErrorSummary/__stories__/WithBackLinkAndButton';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { List, ListItem } from '@digigov/ui/content/List';
|
|
3
|
+
import { ErrorSummary } from '@digigov/ui/feedback/ErrorSummary';
|
|
4
|
+
import { FieldContainer } from '@digigov/ui/form/FieldContainer';
|
|
5
|
+
import { LabelContainer, LabelTitle } from '@digigov/ui/form/LabelContainer';
|
|
6
|
+
import { TextInput } from '@digigov/ui/form/TextInput';
|
|
7
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
8
|
+
import { Heading } from '@digigov/ui/typography/Heading';
|
|
9
|
+
import { Hint } from '@digigov/ui/typography/Hint';
|
|
10
|
+
|
|
11
|
+
export const ErrorGroupLinkedToInput = () => (
|
|
12
|
+
<div>
|
|
13
|
+
<ErrorSummary variant="error-group">
|
|
14
|
+
<Heading size="md">Τα παρακάτω πεδία της φόρμας ειναι λάθος.</Heading>
|
|
15
|
+
<List listStyle="bullet">
|
|
16
|
+
<ListItem>
|
|
17
|
+
<b>Όνομα επιχείρησης:</b>{' '}
|
|
18
|
+
<Link href="#business-name">
|
|
19
|
+
Πρέπει να συμπληρώσετε το όνομα της επιχείρησης
|
|
20
|
+
</Link>
|
|
21
|
+
</ListItem>
|
|
22
|
+
<ListItem>
|
|
23
|
+
<b>Διεύθυνση επιχείρησης:</b>{' '}
|
|
24
|
+
<Link href="#address-name">
|
|
25
|
+
Πρέπει να συμπληρώσετε τη διεύθυνση της επιχείρησης
|
|
26
|
+
</Link>
|
|
27
|
+
</ListItem>
|
|
28
|
+
</List>
|
|
29
|
+
</ErrorSummary>
|
|
30
|
+
<FieldContainer error>
|
|
31
|
+
<LabelContainer>
|
|
32
|
+
<LabelTitle size="md">Όνομα επιχείρησης</LabelTitle>
|
|
33
|
+
<Hint>Ποιο είναι το όνομα της επιχείρησης;</Hint>
|
|
34
|
+
<TextInput error name="inputext" id="business-name"></TextInput>
|
|
35
|
+
</LabelContainer>
|
|
36
|
+
</FieldContainer>
|
|
37
|
+
<FieldContainer error>
|
|
38
|
+
<LabelContainer>
|
|
39
|
+
<LabelTitle size="md">Διεύθυνση επιχείρησης</LabelTitle>
|
|
40
|
+
<Hint>Ποια είναι η διεύθυνση της επιχείρησης;</Hint>
|
|
41
|
+
<TextInput error name="inputext" id="business-address"></TextInput>
|
|
42
|
+
</LabelContainer>
|
|
43
|
+
</FieldContainer>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export default ErrorGroupLinkedToInput;
|
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Default } from '@digigov/ui/feedback/ErrorSummary/__stories__/Default';
|
|
4
5
|
import { Dense } from '@digigov/ui/feedback/ErrorSummary/__stories__/Dense';
|
|
6
|
+
import { ErrorGroupLinkedToInput } from '@digigov/ui/feedback/ErrorSummary/__stories__/ErrorGroupLinkedToInput';
|
|
5
7
|
import { LinkedToCheckbox } from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToCheckbox';
|
|
6
8
|
import { LinkedToField } from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToField';
|
|
7
9
|
import { LinkedToInput } from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToInput';
|
|
8
10
|
import { WithBackLinkAndButton } from '@digigov/ui/feedback/ErrorSummary/__stories__/WithBackLinkAndButton';
|
|
9
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
10
11
|
|
|
11
12
|
test('renders the All ErrorSummary variants', async ({ mount, page }) => {
|
|
12
13
|
await mount(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</
|
|
33
|
-
|
|
14
|
+
|
|
15
|
+
<div>
|
|
16
|
+
<TestVariant title="Default">
|
|
17
|
+
<Default />
|
|
18
|
+
</TestVariant>
|
|
19
|
+
<TestVariant title="Dense">
|
|
20
|
+
<Dense />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="ErrorGroupLinkedToInput">
|
|
23
|
+
<ErrorGroupLinkedToInput />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
<TestVariant title="LinkedToCheckbox">
|
|
26
|
+
<LinkedToCheckbox />
|
|
27
|
+
</TestVariant>
|
|
28
|
+
<TestVariant title="LinkedToField">
|
|
29
|
+
<LinkedToField />
|
|
30
|
+
</TestVariant>
|
|
31
|
+
<TestVariant title="LinkedToInput">
|
|
32
|
+
<LinkedToInput />
|
|
33
|
+
</TestVariant>
|
|
34
|
+
<TestVariant title="WithBackLinkAndButton">
|
|
35
|
+
<WithBackLinkAndButton />
|
|
36
|
+
</TestVariant>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
34
39
|
await page.evaluate(() => document.fonts.ready);
|
|
35
40
|
|
|
36
|
-
const screenshot = await page.screenshot({
|
|
37
|
-
fullPage: true,
|
|
38
|
-
animations: 'disabled',
|
|
39
|
-
});
|
|
41
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
40
42
|
expect(screenshot).toMatchSnapshot();
|
|
41
43
|
});
|
|
44
|
+
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Default } from '@digigov/ui/feedback/NotificationBanner/__stories__/Default';
|
|
4
5
|
import { Dense } from '@digigov/ui/feedback/NotificationBanner/__stories__/Dense';
|
|
5
6
|
import { Success } from '@digigov/ui/feedback/NotificationBanner/__stories__/Success';
|
|
6
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
7
7
|
|
|
8
8
|
test('renders the All NotificationBanner variants', async ({ mount, page }) => {
|
|
9
9
|
await mount(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</
|
|
21
|
-
|
|
10
|
+
|
|
11
|
+
<div>
|
|
12
|
+
<TestVariant title="Default">
|
|
13
|
+
<Default />
|
|
14
|
+
</TestVariant>
|
|
15
|
+
<TestVariant title="Dense">
|
|
16
|
+
<Dense />
|
|
17
|
+
</TestVariant>
|
|
18
|
+
<TestVariant title="Success">
|
|
19
|
+
<Success />
|
|
20
|
+
</TestVariant>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
22
23
|
await page.evaluate(() => document.fonts.ready);
|
|
23
24
|
|
|
24
|
-
const screenshot = await page.screenshot({
|
|
25
|
-
fullPage: true,
|
|
26
|
-
animations: 'disabled',
|
|
27
|
-
});
|
|
25
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
28
26
|
expect(screenshot).toMatchSnapshot();
|
|
29
27
|
});
|
|
28
|
+
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Default } from '@digigov/ui/feedback/PhaseBanner/__stories__/Default';
|
|
4
5
|
import { Underlined } from '@digigov/ui/feedback/PhaseBanner/__stories__/Underlined';
|
|
5
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
6
6
|
|
|
7
7
|
test('renders the All PhaseBanner variants', async ({ mount, page }) => {
|
|
8
8
|
await mount(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</
|
|
17
|
-
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<TestVariant title="Default">
|
|
12
|
+
<Default />
|
|
13
|
+
</TestVariant>
|
|
14
|
+
<TestVariant title="Underlined">
|
|
15
|
+
<Underlined />
|
|
16
|
+
</TestVariant>
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
18
19
|
await page.evaluate(() => document.fonts.ready);
|
|
19
20
|
|
|
20
|
-
const screenshot = await page.screenshot({
|
|
21
|
-
fullPage: true,
|
|
22
|
-
animations: 'disabled',
|
|
23
|
-
});
|
|
21
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
24
22
|
expect(screenshot).toMatchSnapshot();
|
|
25
23
|
});
|
|
24
|
+
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { AssistiveText } from '@digigov/ui/feedback/WarningText/__stories__/AssistiveText';
|
|
4
5
|
import { Default } from '@digigov/ui/feedback/WarningText/__stories__/Default';
|
|
5
6
|
import { Dense } from '@digigov/ui/feedback/WarningText/__stories__/Dense';
|
|
6
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
7
7
|
|
|
8
8
|
test('renders the All WarningText variants', async ({ mount, page }) => {
|
|
9
9
|
await mount(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</
|
|
21
|
-
|
|
10
|
+
|
|
11
|
+
<div>
|
|
12
|
+
<TestVariant title="AssistiveText">
|
|
13
|
+
<AssistiveText />
|
|
14
|
+
</TestVariant>
|
|
15
|
+
<TestVariant title="Default">
|
|
16
|
+
<Default />
|
|
17
|
+
</TestVariant>
|
|
18
|
+
<TestVariant title="Dense">
|
|
19
|
+
<Dense />
|
|
20
|
+
</TestVariant>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
22
23
|
await page.evaluate(() => document.fonts.ready);
|
|
23
24
|
|
|
24
|
-
const screenshot = await page.screenshot({
|
|
25
|
-
fullPage: true,
|
|
26
|
-
animations: 'disabled',
|
|
27
|
-
});
|
|
25
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
28
26
|
expect(screenshot).toMatchSnapshot();
|
|
29
27
|
});
|
|
28
|
+
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
3
|
+
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
3
4
|
import { Default } from '@digigov/ui/form/AutoComplete/__stories__/Default';
|
|
4
5
|
import { Multiple } from '@digigov/ui/form/AutoComplete/__stories__/Multiple';
|
|
5
6
|
import { MultipleShowingTwoSelected } from '@digigov/ui/form/AutoComplete/__stories__/MultipleShowingTwoSelected';
|
|
@@ -10,48 +11,46 @@ import { WithDefaultValue } from '@digigov/ui/form/AutoComplete/__stories__/With
|
|
|
10
11
|
import { WithMinLength } from '@digigov/ui/form/AutoComplete/__stories__/WithMinLength';
|
|
11
12
|
import { WithPlaceHolder } from '@digigov/ui/form/AutoComplete/__stories__/WithPlaceHolder';
|
|
12
13
|
import { WithShowAllValues } from '@digigov/ui/form/AutoComplete/__stories__/WithShowAllValues';
|
|
13
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
14
14
|
|
|
15
15
|
test('renders the All AutoComplete variants', async ({ mount, page }) => {
|
|
16
16
|
await mount(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</
|
|
49
|
-
|
|
17
|
+
|
|
18
|
+
<div>
|
|
19
|
+
<TestVariant title="Default">
|
|
20
|
+
<Default />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="Multiple">
|
|
23
|
+
<Multiple />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
<TestVariant title="MultipleShowingTwoSelected">
|
|
26
|
+
<MultipleShowingTwoSelected />
|
|
27
|
+
</TestVariant>
|
|
28
|
+
<TestVariant title="MultipleWithDefaultValues">
|
|
29
|
+
<MultipleWithDefaultValues />
|
|
30
|
+
</TestVariant>
|
|
31
|
+
<TestVariant title="MultipleWithMinLength">
|
|
32
|
+
<MultipleWithMinLength />
|
|
33
|
+
</TestVariant>
|
|
34
|
+
<TestVariant title="WithAutoSelect">
|
|
35
|
+
<WithAutoSelect />
|
|
36
|
+
</TestVariant>
|
|
37
|
+
<TestVariant title="WithDefaultValue">
|
|
38
|
+
<WithDefaultValue />
|
|
39
|
+
</TestVariant>
|
|
40
|
+
<TestVariant title="WithMinLength">
|
|
41
|
+
<WithMinLength />
|
|
42
|
+
</TestVariant>
|
|
43
|
+
<TestVariant title="WithPlaceHolder">
|
|
44
|
+
<WithPlaceHolder />
|
|
45
|
+
</TestVariant>
|
|
46
|
+
<TestVariant title="WithShowAllValues">
|
|
47
|
+
<WithShowAllValues />
|
|
48
|
+
</TestVariant>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
50
51
|
await page.evaluate(() => document.fonts.ready);
|
|
51
52
|
|
|
52
|
-
const screenshot = await page.screenshot({
|
|
53
|
-
fullPage: true,
|
|
54
|
-
animations: 'disabled',
|
|
55
|
-
});
|
|
53
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
56
54
|
expect(screenshot).toMatchSnapshot();
|
|
57
55
|
});
|
|
56
|
+
|