@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 { Back } from '@digigov/ui/form/Button/__stories__/Back';
|
|
4
5
|
import { ButtonLinkButton } from '@digigov/ui/form/Button/__stories__/ButtonLinkButton';
|
|
5
6
|
import { CallToActionButton } from '@digigov/ui/form/Button/__stories__/CallToActionButton';
|
|
@@ -12,54 +13,52 @@ import { Secondary } from '@digigov/ui/form/Button/__stories__/Secondary';
|
|
|
12
13
|
import { ThemeToggle } from '@digigov/ui/form/Button/__stories__/ThemeToggle';
|
|
13
14
|
import { Warning } from '@digigov/ui/form/Button/__stories__/Warning';
|
|
14
15
|
import { WithVariantLink } from '@digigov/ui/form/Button/__stories__/WithVariantLink';
|
|
15
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
16
16
|
|
|
17
17
|
test('renders the All Button variants', async ({ mount, page }) => {
|
|
18
18
|
await mount(
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</
|
|
57
|
-
|
|
19
|
+
|
|
20
|
+
<div>
|
|
21
|
+
<TestVariant title="Back">
|
|
22
|
+
<Back />
|
|
23
|
+
</TestVariant>
|
|
24
|
+
<TestVariant title="ButtonLinkButton">
|
|
25
|
+
<ButtonLinkButton />
|
|
26
|
+
</TestVariant>
|
|
27
|
+
<TestVariant title="CallToActionButton">
|
|
28
|
+
<CallToActionButton />
|
|
29
|
+
</TestVariant>
|
|
30
|
+
<TestVariant title="Dense">
|
|
31
|
+
<Dense />
|
|
32
|
+
</TestVariant>
|
|
33
|
+
<TestVariant title="Disabled">
|
|
34
|
+
<Disabled />
|
|
35
|
+
</TestVariant>
|
|
36
|
+
<TestVariant title="GroupingButtons">
|
|
37
|
+
<GroupingButtons />
|
|
38
|
+
</TestVariant>
|
|
39
|
+
<TestVariant title="GroupingButtonsAndLinks">
|
|
40
|
+
<GroupingButtonsAndLinks />
|
|
41
|
+
</TestVariant>
|
|
42
|
+
<TestVariant title="Primary">
|
|
43
|
+
<Primary />
|
|
44
|
+
</TestVariant>
|
|
45
|
+
<TestVariant title="Secondary">
|
|
46
|
+
<Secondary />
|
|
47
|
+
</TestVariant>
|
|
48
|
+
<TestVariant title="ThemeToggle">
|
|
49
|
+
<ThemeToggle />
|
|
50
|
+
</TestVariant>
|
|
51
|
+
<TestVariant title="Warning">
|
|
52
|
+
<Warning />
|
|
53
|
+
</TestVariant>
|
|
54
|
+
<TestVariant title="WithVariantLink">
|
|
55
|
+
<WithVariantLink />
|
|
56
|
+
</TestVariant>
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
58
59
|
await page.evaluate(() => document.fonts.ready);
|
|
59
60
|
|
|
60
|
-
const screenshot = await page.screenshot({
|
|
61
|
-
fullPage: true,
|
|
62
|
-
animations: 'disabled',
|
|
63
|
-
});
|
|
61
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
64
62
|
expect(screenshot).toMatchSnapshot();
|
|
65
63
|
});
|
|
64
|
+
|
|
@@ -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 { ConditionalReveal } from '@digigov/ui/form/Checkbox/__stories__/ConditionalReveal';
|
|
4
5
|
import { Default } from '@digigov/ui/form/Checkbox/__stories__/Default';
|
|
5
6
|
import { Dense } from '@digigov/ui/form/Checkbox/__stories__/Dense';
|
|
@@ -10,48 +11,46 @@ import { NoneAnswer } from '@digigov/ui/form/Checkbox/__stories__/NoneAnswer';
|
|
|
10
11
|
import { NoneAnswerWithError } from '@digigov/ui/form/Checkbox/__stories__/NoneAnswerWithError';
|
|
11
12
|
import { WithErrorMessage } from '@digigov/ui/form/Checkbox/__stories__/WithErrorMessage';
|
|
12
13
|
import { WithHint } from '@digigov/ui/form/Checkbox/__stories__/WithHint';
|
|
13
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
14
14
|
|
|
15
15
|
test('renders the All Checkbox 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="ConditionalReveal">
|
|
20
|
+
<ConditionalReveal />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="Default">
|
|
23
|
+
<Default />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
<TestVariant title="Dense">
|
|
26
|
+
<Dense />
|
|
27
|
+
</TestVariant>
|
|
28
|
+
<TestVariant title="Inline">
|
|
29
|
+
<Inline />
|
|
30
|
+
</TestVariant>
|
|
31
|
+
<TestVariant title="InlineWithDivider">
|
|
32
|
+
<InlineWithDivider />
|
|
33
|
+
</TestVariant>
|
|
34
|
+
<TestVariant title="MultipleQuestions">
|
|
35
|
+
<MultipleQuestions />
|
|
36
|
+
</TestVariant>
|
|
37
|
+
<TestVariant title="NoneAnswer">
|
|
38
|
+
<NoneAnswer />
|
|
39
|
+
</TestVariant>
|
|
40
|
+
<TestVariant title="NoneAnswerWithError">
|
|
41
|
+
<NoneAnswerWithError />
|
|
42
|
+
</TestVariant>
|
|
43
|
+
<TestVariant title="WithErrorMessage">
|
|
44
|
+
<WithErrorMessage />
|
|
45
|
+
</TestVariant>
|
|
46
|
+
<TestVariant title="WithHint">
|
|
47
|
+
<WithHint />
|
|
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
|
+
|
|
@@ -1,37 +1,36 @@
|
|
|
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/DateInputContainer/__stories__/Default';
|
|
4
5
|
import { Dense } from '@digigov/ui/form/DateInputContainer/__stories__/Dense';
|
|
5
6
|
import { MultipleQuestions } from '@digigov/ui/form/DateInputContainer/__stories__/MultipleQuestions';
|
|
6
7
|
import { WithErrorMessage } from '@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessage';
|
|
7
8
|
import { WithErrorMessageForSingleField } from '@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessageForSingleField';
|
|
8
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
9
9
|
|
|
10
10
|
test('renders the All DateInputContainer variants', async ({ mount, page }) => {
|
|
11
11
|
await mount(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</
|
|
29
|
-
|
|
12
|
+
|
|
13
|
+
<div>
|
|
14
|
+
<TestVariant title="Default">
|
|
15
|
+
<Default />
|
|
16
|
+
</TestVariant>
|
|
17
|
+
<TestVariant title="Dense">
|
|
18
|
+
<Dense />
|
|
19
|
+
</TestVariant>
|
|
20
|
+
<TestVariant title="MultipleQuestions">
|
|
21
|
+
<MultipleQuestions />
|
|
22
|
+
</TestVariant>
|
|
23
|
+
<TestVariant title="WithErrorMessage">
|
|
24
|
+
<WithErrorMessage />
|
|
25
|
+
</TestVariant>
|
|
26
|
+
<TestVariant title="WithErrorMessageForSingleField">
|
|
27
|
+
<WithErrorMessageForSingleField />
|
|
28
|
+
</TestVariant>
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
30
31
|
await page.evaluate(() => document.fonts.ready);
|
|
31
32
|
|
|
32
|
-
const screenshot = await page.screenshot({
|
|
33
|
-
fullPage: true,
|
|
34
|
-
animations: 'disabled',
|
|
35
|
-
});
|
|
33
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
36
34
|
expect(screenshot).toMatchSnapshot();
|
|
37
35
|
});
|
|
36
|
+
|
|
@@ -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 { DateInputError } from '@digigov/ui/form/ErrorMessage/__stories__/DateInputError';
|
|
4
5
|
import { Default } from '@digigov/ui/form/ErrorMessage/__stories__/Default';
|
|
5
6
|
import { ErrorMessageOnly } from '@digigov/ui/form/ErrorMessage/__stories__/ErrorMessageOnly';
|
|
6
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
7
7
|
|
|
8
8
|
test('renders the All ErrorMessage 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="DateInputError">
|
|
13
|
+
<DateInputError />
|
|
14
|
+
</TestVariant>
|
|
15
|
+
<TestVariant title="Default">
|
|
16
|
+
<Default />
|
|
17
|
+
</TestVariant>
|
|
18
|
+
<TestVariant title="ErrorMessageOnly">
|
|
19
|
+
<ErrorMessageOnly />
|
|
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/form/FileUpload/__stories__/Default';
|
|
4
5
|
import { WithErrorMessage } from '@digigov/ui/form/FileUpload/__stories__/WithErrorMessage';
|
|
5
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
6
6
|
|
|
7
7
|
test('renders the All FileUpload 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="WithErrorMessage">
|
|
15
|
+
<WithErrorMessage />
|
|
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,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 { ConditionalReveal } from '@digigov/ui/form/RadioContainer/__stories__/ConditionalReveal';
|
|
4
5
|
import { Default } from '@digigov/ui/form/RadioContainer/__stories__/Default';
|
|
5
6
|
import { Dense } from '@digigov/ui/form/RadioContainer/__stories__/Dense';
|
|
@@ -10,48 +11,46 @@ import { NoneAnswer } from '@digigov/ui/form/RadioContainer/__stories__/NoneAnsw
|
|
|
10
11
|
import { WithErrorMessage } from '@digigov/ui/form/RadioContainer/__stories__/WithErrorMessage';
|
|
11
12
|
import { WithHints } from '@digigov/ui/form/RadioContainer/__stories__/WithHints';
|
|
12
13
|
import { WithMediumLegend } from '@digigov/ui/form/RadioContainer/__stories__/WithMediumLegend';
|
|
13
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
14
14
|
|
|
15
15
|
test('renders the All RadioContainer 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="ConditionalReveal">
|
|
20
|
+
<ConditionalReveal />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="Default">
|
|
23
|
+
<Default />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
<TestVariant title="Dense">
|
|
26
|
+
<Dense />
|
|
27
|
+
</TestVariant>
|
|
28
|
+
<TestVariant title="Inline">
|
|
29
|
+
<Inline />
|
|
30
|
+
</TestVariant>
|
|
31
|
+
<TestVariant title="InlineWithDivider">
|
|
32
|
+
<InlineWithDivider />
|
|
33
|
+
</TestVariant>
|
|
34
|
+
<TestVariant title="MultipleQuestions">
|
|
35
|
+
<MultipleQuestions />
|
|
36
|
+
</TestVariant>
|
|
37
|
+
<TestVariant title="NoneAnswer">
|
|
38
|
+
<NoneAnswer />
|
|
39
|
+
</TestVariant>
|
|
40
|
+
<TestVariant title="WithErrorMessage">
|
|
41
|
+
<WithErrorMessage />
|
|
42
|
+
</TestVariant>
|
|
43
|
+
<TestVariant title="WithHints">
|
|
44
|
+
<WithHints />
|
|
45
|
+
</TestVariant>
|
|
46
|
+
<TestVariant title="WithMediumLegend">
|
|
47
|
+
<WithMediumLegend />
|
|
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
|
+
|
|
@@ -1,21 +1,20 @@
|
|
|
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/SearchContainer/__stories__/Default';
|
|
4
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
5
5
|
|
|
6
6
|
test('renders the All SearchContainer variants', async ({ mount, page }) => {
|
|
7
7
|
await mount(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</
|
|
13
|
-
|
|
8
|
+
|
|
9
|
+
<div>
|
|
10
|
+
<TestVariant title="Default">
|
|
11
|
+
<Default />
|
|
12
|
+
</TestVariant>
|
|
13
|
+
</div>
|
|
14
|
+
)
|
|
14
15
|
await page.evaluate(() => document.fonts.ready);
|
|
15
16
|
|
|
16
|
-
const screenshot = await page.screenshot({
|
|
17
|
-
fullPage: true,
|
|
18
|
-
animations: 'disabled',
|
|
19
|
-
});
|
|
17
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
20
18
|
expect(screenshot).toMatchSnapshot();
|
|
21
19
|
});
|
|
20
|
+
|
|
@@ -1,33 +1,32 @@
|
|
|
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/SelectContainer/__stories__/Default';
|
|
4
5
|
import { Dense } from '@digigov/ui/form/SelectContainer/__stories__/Dense';
|
|
5
6
|
import { DisabledInput } from '@digigov/ui/form/SelectContainer/__stories__/DisabledInput';
|
|
6
7
|
import { WithHint } from '@digigov/ui/form/SelectContainer/__stories__/WithHint';
|
|
7
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
8
8
|
|
|
9
9
|
test('renders the All SelectContainer variants', async ({ mount, page }) => {
|
|
10
10
|
await mount(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
|
|
11
|
+
|
|
12
|
+
<div>
|
|
13
|
+
<TestVariant title="Default">
|
|
14
|
+
<Default />
|
|
15
|
+
</TestVariant>
|
|
16
|
+
<TestVariant title="Dense">
|
|
17
|
+
<Dense />
|
|
18
|
+
</TestVariant>
|
|
19
|
+
<TestVariant title="DisabledInput">
|
|
20
|
+
<DisabledInput />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="WithHint">
|
|
23
|
+
<WithHint />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
26
27
|
await page.evaluate(() => document.fonts.ready);
|
|
27
28
|
|
|
28
|
-
const screenshot = await page.screenshot({
|
|
29
|
-
fullPage: true,
|
|
30
|
-
animations: 'disabled',
|
|
31
|
-
});
|
|
29
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
32
30
|
expect(screenshot).toMatchSnapshot();
|
|
33
31
|
});
|
|
32
|
+
|
|
@@ -1,36 +1,32 @@
|
|
|
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/SingleCharacterInputs/__stories__/Default';
|
|
4
5
|
import { WithDefaultError } from '@digigov/ui/form/SingleCharacterInputs/__stories__/WithDefaultError';
|
|
5
6
|
import { WithErrorMessageInvalidCode } from '@digigov/ui/form/SingleCharacterInputs/__stories__/WithErrorMessageInvalidCode';
|
|
6
7
|
import { WithErrorMessageLessDigit } from '@digigov/ui/form/SingleCharacterInputs/__stories__/WithErrorMessageLessDigit';
|
|
7
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
8
8
|
|
|
9
|
-
test('renders the All SingleCharacterInputs variants', async ({
|
|
10
|
-
mount,
|
|
11
|
-
page,
|
|
12
|
-
}) => {
|
|
9
|
+
test('renders the All SingleCharacterInputs variants', async ({ mount, page }) => {
|
|
13
10
|
await mount(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</
|
|
28
|
-
|
|
11
|
+
|
|
12
|
+
<div>
|
|
13
|
+
<TestVariant title="Default">
|
|
14
|
+
<Default />
|
|
15
|
+
</TestVariant>
|
|
16
|
+
<TestVariant title="WithDefaultError">
|
|
17
|
+
<WithDefaultError />
|
|
18
|
+
</TestVariant>
|
|
19
|
+
<TestVariant title="WithErrorMessageInvalidCode">
|
|
20
|
+
<WithErrorMessageInvalidCode />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="WithErrorMessageLessDigit">
|
|
23
|
+
<WithErrorMessageLessDigit />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
29
27
|
await page.evaluate(() => document.fonts.ready);
|
|
30
28
|
|
|
31
|
-
const screenshot = await page.screenshot({
|
|
32
|
-
fullPage: true,
|
|
33
|
-
animations: 'disabled',
|
|
34
|
-
});
|
|
29
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
35
30
|
expect(screenshot).toMatchSnapshot();
|
|
36
31
|
});
|
|
32
|
+
|