@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,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/navigation/BackLink/__stories__/Default';
|
|
4
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
5
5
|
|
|
6
6
|
test('renders the All BackLink 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,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/navigation/BackToTopLink/__stories__/Default';
|
|
4
5
|
import { InMain } from '@digigov/ui/navigation/BackToTopLink/__stories__/InMain';
|
|
5
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
6
6
|
|
|
7
7
|
test('renders the All BackToTopLink 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="InMain">
|
|
15
|
+
<InMain />
|
|
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,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 { Auto } from '@digigov/ui/navigation/Breadcrumbs/__stories__/Auto';
|
|
4
5
|
import { Default } from '@digigov/ui/navigation/Breadcrumbs/__stories__/Default';
|
|
5
6
|
import { WithHook } from '@digigov/ui/navigation/Breadcrumbs/__stories__/WithHook';
|
|
6
7
|
import { WithoutCurrentPage } from '@digigov/ui/navigation/Breadcrumbs/__stories__/WithoutCurrentPage';
|
|
7
8
|
import { WithProvider } from '@digigov/ui/navigation/Breadcrumbs/__stories__/WithProvider';
|
|
8
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
9
9
|
|
|
10
10
|
test('renders the All Breadcrumbs 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="Auto">
|
|
15
|
+
<Auto />
|
|
16
|
+
</TestVariant>
|
|
17
|
+
<TestVariant title="Default">
|
|
18
|
+
<Default />
|
|
19
|
+
</TestVariant>
|
|
20
|
+
<TestVariant title="WithHook">
|
|
21
|
+
<WithHook />
|
|
22
|
+
</TestVariant>
|
|
23
|
+
<TestVariant title="WithoutCurrentPage">
|
|
24
|
+
<WithoutCurrentPage />
|
|
25
|
+
</TestVariant>
|
|
26
|
+
<TestVariant title="WithProvider">
|
|
27
|
+
<WithProvider />
|
|
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 { Auto } from '@digigov/ui/navigation/Drawer/__stories__/Auto';
|
|
4
5
|
import { Default } from '@digigov/ui/navigation/Drawer/__stories__/Default';
|
|
5
6
|
import { WithHook } from '@digigov/ui/navigation/Drawer/__stories__/WithHook';
|
|
6
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
7
7
|
|
|
8
8
|
test('renders the All Drawer 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="Auto">
|
|
13
|
+
<Auto />
|
|
14
|
+
</TestVariant>
|
|
15
|
+
<TestVariant title="Default">
|
|
16
|
+
<Default />
|
|
17
|
+
</TestVariant>
|
|
18
|
+
<TestVariant title="WithHook">
|
|
19
|
+
<WithHook />
|
|
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 { AlignRight } from '@digigov/ui/navigation/Dropdown/__stories__/AlignRight';
|
|
4
5
|
import { ContentPosition } from '@digigov/ui/navigation/Dropdown/__stories__/ContentPosition';
|
|
5
6
|
import { Default } from '@digigov/ui/navigation/Dropdown/__stories__/Default';
|
|
@@ -11,51 +12,49 @@ import { Secondary } from '@digigov/ui/navigation/Dropdown/__stories__/Secondary
|
|
|
11
12
|
import { VariantLink } from '@digigov/ui/navigation/Dropdown/__stories__/VariantLink';
|
|
12
13
|
import { Warning } from '@digigov/ui/navigation/Dropdown/__stories__/Warning';
|
|
13
14
|
import { WithIcons } from '@digigov/ui/navigation/Dropdown/__stories__/WithIcons';
|
|
14
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
15
15
|
|
|
16
16
|
test('renders the All Dropdown variants', async ({ mount, page }) => {
|
|
17
17
|
await mount(
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</
|
|
53
|
-
|
|
18
|
+
|
|
19
|
+
<div>
|
|
20
|
+
<TestVariant title="AlignRight">
|
|
21
|
+
<AlignRight />
|
|
22
|
+
</TestVariant>
|
|
23
|
+
<TestVariant title="ContentPosition">
|
|
24
|
+
<ContentPosition />
|
|
25
|
+
</TestVariant>
|
|
26
|
+
<TestVariant title="Default">
|
|
27
|
+
<Default />
|
|
28
|
+
</TestVariant>
|
|
29
|
+
<TestVariant title="Dense">
|
|
30
|
+
<Dense />
|
|
31
|
+
</TestVariant>
|
|
32
|
+
<TestVariant title="Disabled">
|
|
33
|
+
<Disabled />
|
|
34
|
+
</TestVariant>
|
|
35
|
+
<TestVariant title="PlacementTop">
|
|
36
|
+
<PlacementTop />
|
|
37
|
+
</TestVariant>
|
|
38
|
+
<TestVariant title="ScrollableContent">
|
|
39
|
+
<ScrollableContent />
|
|
40
|
+
</TestVariant>
|
|
41
|
+
<TestVariant title="Secondary">
|
|
42
|
+
<Secondary />
|
|
43
|
+
</TestVariant>
|
|
44
|
+
<TestVariant title="VariantLink">
|
|
45
|
+
<VariantLink />
|
|
46
|
+
</TestVariant>
|
|
47
|
+
<TestVariant title="Warning">
|
|
48
|
+
<Warning />
|
|
49
|
+
</TestVariant>
|
|
50
|
+
<TestVariant title="WithIcons">
|
|
51
|
+
<WithIcons />
|
|
52
|
+
</TestVariant>
|
|
53
|
+
</div>
|
|
54
|
+
)
|
|
54
55
|
await page.evaluate(() => document.fonts.ready);
|
|
55
56
|
|
|
56
|
-
const screenshot = await page.screenshot({
|
|
57
|
-
fullPage: true,
|
|
58
|
-
animations: 'disabled',
|
|
59
|
-
});
|
|
57
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
60
58
|
expect(screenshot).toMatchSnapshot();
|
|
61
59
|
});
|
|
60
|
+
|
|
@@ -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 { DarkBackground } from '@digigov/ui/navigation/Link/__stories__/DarkBackground';
|
|
4
5
|
import { DarkBackgroundNoUnderline } from '@digigov/ui/navigation/Link/__stories__/DarkBackgroundNoUnderline';
|
|
5
6
|
import { Default } from '@digigov/ui/navigation/Link/__stories__/Default';
|
|
@@ -7,39 +8,37 @@ import { ExternalLink } from '@digigov/ui/navigation/Link/__stories__/ExternalLi
|
|
|
7
8
|
import { NoUnderline } from '@digigov/ui/navigation/Link/__stories__/NoUnderline';
|
|
8
9
|
import { OpensInNewTab } from '@digigov/ui/navigation/Link/__stories__/OpensInNewTab';
|
|
9
10
|
import { WithProvider } from '@digigov/ui/navigation/Link/__stories__/WithProvider';
|
|
10
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
11
11
|
|
|
12
12
|
test('renders the All Link variants', async ({ mount, page }) => {
|
|
13
13
|
await mount(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</
|
|
37
|
-
|
|
14
|
+
|
|
15
|
+
<div>
|
|
16
|
+
<TestVariant title="DarkBackground">
|
|
17
|
+
<DarkBackground />
|
|
18
|
+
</TestVariant>
|
|
19
|
+
<TestVariant title="DarkBackgroundNoUnderline">
|
|
20
|
+
<DarkBackgroundNoUnderline />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="Default">
|
|
23
|
+
<Default />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
<TestVariant title="ExternalLink">
|
|
26
|
+
<ExternalLink />
|
|
27
|
+
</TestVariant>
|
|
28
|
+
<TestVariant title="NoUnderline">
|
|
29
|
+
<NoUnderline />
|
|
30
|
+
</TestVariant>
|
|
31
|
+
<TestVariant title="OpensInNewTab">
|
|
32
|
+
<OpensInNewTab />
|
|
33
|
+
</TestVariant>
|
|
34
|
+
<TestVariant title="WithProvider">
|
|
35
|
+
<WithProvider />
|
|
36
|
+
</TestVariant>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
38
39
|
await page.evaluate(() => document.fonts.ready);
|
|
39
40
|
|
|
40
|
-
const screenshot = await page.screenshot({
|
|
41
|
-
fullPage: true,
|
|
42
|
-
animations: 'disabled',
|
|
43
|
-
});
|
|
41
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
44
42
|
expect(screenshot).toMatchSnapshot();
|
|
45
43
|
});
|
|
44
|
+
|
|
@@ -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/navigation/NavList/__stories__/Default';
|
|
4
5
|
import { HorizontalWithDrawer } from '@digigov/ui/navigation/NavList/__stories__/HorizontalWithDrawer';
|
|
5
6
|
import { HorizontalWithoutDrawer } from '@digigov/ui/navigation/NavList/__stories__/HorizontalWithoutDrawer';
|
|
@@ -9,45 +10,43 @@ import { UsingNavListAuto } from '@digigov/ui/navigation/NavList/__stories__/Usi
|
|
|
9
10
|
import { Vertical } from '@digigov/ui/navigation/NavList/__stories__/Vertical';
|
|
10
11
|
import { VerticalWithoutDrawer } from '@digigov/ui/navigation/NavList/__stories__/VerticalWithoutDrawer';
|
|
11
12
|
import { WithBadge } from '@digigov/ui/navigation/NavList/__stories__/WithBadge';
|
|
12
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
13
13
|
|
|
14
14
|
test('renders the All NavList variants', async ({ mount, page }) => {
|
|
15
15
|
await mount(
|
|
16
|
-
|
|
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
|
-
|
|
16
|
+
|
|
17
|
+
<div>
|
|
18
|
+
<TestVariant title="Default">
|
|
19
|
+
<Default />
|
|
20
|
+
</TestVariant>
|
|
21
|
+
<TestVariant title="HorizontalWithDrawer">
|
|
22
|
+
<HorizontalWithDrawer />
|
|
23
|
+
</TestVariant>
|
|
24
|
+
<TestVariant title="HorizontalWithoutDrawer">
|
|
25
|
+
<HorizontalWithoutDrawer />
|
|
26
|
+
</TestVariant>
|
|
27
|
+
<TestVariant title="NavListWithoutNav">
|
|
28
|
+
<NavListWithoutNav />
|
|
29
|
+
</TestVariant>
|
|
30
|
+
<TestVariant title="UsingHeaderButton">
|
|
31
|
+
<UsingHeaderButton />
|
|
32
|
+
</TestVariant>
|
|
33
|
+
<TestVariant title="UsingNavListAuto">
|
|
34
|
+
<UsingNavListAuto />
|
|
35
|
+
</TestVariant>
|
|
36
|
+
<TestVariant title="Vertical">
|
|
37
|
+
<Vertical />
|
|
38
|
+
</TestVariant>
|
|
39
|
+
<TestVariant title="VerticalWithoutDrawer">
|
|
40
|
+
<VerticalWithoutDrawer />
|
|
41
|
+
</TestVariant>
|
|
42
|
+
<TestVariant title="WithBadge">
|
|
43
|
+
<WithBadge />
|
|
44
|
+
</TestVariant>
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
46
47
|
await page.evaluate(() => document.fonts.ready);
|
|
47
48
|
|
|
48
|
-
const screenshot = await page.screenshot({
|
|
49
|
-
fullPage: true,
|
|
50
|
-
animations: 'disabled',
|
|
51
|
-
});
|
|
49
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
52
50
|
expect(screenshot).toMatchSnapshot();
|
|
53
51
|
});
|
|
52
|
+
|
|
@@ -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 { Auto } from '@digigov/ui/navigation/Pagination/__stories__/Auto';
|
|
4
5
|
import { Default } from '@digigov/ui/navigation/Pagination/__stories__/Default';
|
|
5
6
|
import { PaginationSmall } from '@digigov/ui/navigation/Pagination/__stories__/PaginationSmall';
|
|
@@ -7,39 +8,37 @@ import { PaginationWithSmallFont } from '@digigov/ui/navigation/Pagination/__sto
|
|
|
7
8
|
import { WithHook } from '@digigov/ui/navigation/Pagination/__stories__/WithHook';
|
|
8
9
|
import { WithInactiveValues } from '@digigov/ui/navigation/Pagination/__stories__/WithInactiveValues';
|
|
9
10
|
import { WithResultsPerPage } from '@digigov/ui/navigation/Pagination/__stories__/WithResultsPerPage';
|
|
10
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
11
11
|
|
|
12
12
|
test('renders the All Pagination variants', async ({ mount, page }) => {
|
|
13
13
|
await mount(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</
|
|
37
|
-
|
|
14
|
+
|
|
15
|
+
<div>
|
|
16
|
+
<TestVariant title="Auto">
|
|
17
|
+
<Auto />
|
|
18
|
+
</TestVariant>
|
|
19
|
+
<TestVariant title="Default">
|
|
20
|
+
<Default />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="PaginationSmall">
|
|
23
|
+
<PaginationSmall />
|
|
24
|
+
</TestVariant>
|
|
25
|
+
<TestVariant title="PaginationWithSmallFont">
|
|
26
|
+
<PaginationWithSmallFont />
|
|
27
|
+
</TestVariant>
|
|
28
|
+
<TestVariant title="WithHook">
|
|
29
|
+
<WithHook />
|
|
30
|
+
</TestVariant>
|
|
31
|
+
<TestVariant title="WithInactiveValues">
|
|
32
|
+
<WithInactiveValues />
|
|
33
|
+
</TestVariant>
|
|
34
|
+
<TestVariant title="WithResultsPerPage">
|
|
35
|
+
<WithResultsPerPage />
|
|
36
|
+
</TestVariant>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
38
39
|
await page.evaluate(() => document.fonts.ready);
|
|
39
40
|
|
|
40
|
-
const screenshot = await page.screenshot({
|
|
41
|
-
fullPage: true,
|
|
42
|
-
animations: 'disabled',
|
|
43
|
-
});
|
|
41
|
+
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
44
42
|
expect(screenshot).toMatchSnapshot();
|
|
45
43
|
});
|
|
44
|
+
|
|
@@ -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/navigation/SkipLink/__stories__/Default';
|
|
4
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
5
5
|
|
|
6
6
|
test('renders the All SkipLink 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 { Auto } from '@digigov/ui/navigation/Tabs/__stories__/Auto';
|
|
4
5
|
import { Default } from '@digigov/ui/navigation/Tabs/__stories__/Default';
|
|
5
6
|
import { Dense } from '@digigov/ui/navigation/Tabs/__stories__/Dense';
|
|
6
7
|
import { UsingAccordion } from '@digigov/ui/navigation/Tabs/__stories__/UsingAccordion';
|
|
7
|
-
import TestVariant from '@digigov/ui/utils/TestVariant';
|
|
8
8
|
|
|
9
9
|
test('renders the All Tabs 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="Auto">
|
|
14
|
+
<Auto />
|
|
15
|
+
</TestVariant>
|
|
16
|
+
<TestVariant title="Default">
|
|
17
|
+
<Default />
|
|
18
|
+
</TestVariant>
|
|
19
|
+
<TestVariant title="Dense">
|
|
20
|
+
<Dense />
|
|
21
|
+
</TestVariant>
|
|
22
|
+
<TestVariant title="UsingAccordion">
|
|
23
|
+
<UsingAccordion />
|
|
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
|
+
|