@uva-glass/component-library 3.57.3 → 3.57.5
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/dist/{AddCatalogueLinkForm-Di0xm7Ep.js → AddCatalogueLinkForm-CvJoaUFz.js} +2 -2
- package/dist/{AddCatalogueLinkForm-Di0xm7Ep.js.map → AddCatalogueLinkForm-CvJoaUFz.js.map} +1 -1
- package/dist/{DataTable-Cgn_RKTA.js → DataTable-UslvEf3c.js} +54 -50
- package/dist/DataTable-UslvEf3c.js.map +1 -0
- package/dist/{FeedbackBar-DEDpoNy7.js → FeedbackBar-DsOWAAGt.js} +2 -2
- package/dist/{FeedbackBar-DEDpoNy7.js.map → FeedbackBar-DsOWAAGt.js.map} +1 -1
- package/dist/{Lexical.prod-Dy5aDppc.js → Lexical.prod-BlUfEvo-.js} +1461 -1476
- package/dist/{Lexical.prod-Dy5aDppc.js.map → Lexical.prod-BlUfEvo-.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-CS8a49uL.js → LexicalClipboard.prod-DQbm50C_.js} +132 -131
- package/dist/LexicalClipboard.prod-DQbm50C_.js.map +1 -0
- package/dist/LexicalHtml.prod-Czkg35Fe.js +1129 -0
- package/dist/LexicalHtml.prod-Czkg35Fe.js.map +1 -0
- package/dist/{LexicalLink.prod-DzgwWhQM.js → LexicalLink.prod-6gI2ABQo.js} +141 -141
- package/dist/{LexicalLink.prod-DzgwWhQM.js.map → LexicalLink.prod-6gI2ABQo.js.map} +1 -1
- package/dist/{LexicalList.prod-icY8mpm6.js → LexicalList.prod-CMGvSM1c.js} +265 -265
- package/dist/{LexicalList.prod-icY8mpm6.js.map → LexicalList.prod-CMGvSM1c.js.map} +1 -1
- package/dist/LexicalSelection.prod-DS_R6Cl1.js +99 -0
- package/dist/LexicalSelection.prod-DS_R6Cl1.js.map +1 -0
- package/dist/{LexicalTable.prod-Bf0is-op.js → LexicalTable.prod-D3FUVxbr.js} +582 -582
- package/dist/LexicalTable.prod-D3FUVxbr.js.map +1 -0
- package/dist/LexicalUtils.prod-CNWf_0sq.js +164 -0
- package/dist/LexicalUtils.prod-CNWf_0sq.js.map +1 -0
- package/dist/{LinkContextMenu-C8ehPbP8.js → LinkContextMenu-59-rbxa2.js} +2 -2
- package/dist/{LinkContextMenu-C8ehPbP8.js.map → LinkContextMenu-59-rbxa2.js.map} +1 -1
- package/dist/{PasteHandlerPlugin-CSo_lOE8.js → PasteHandlerPlugin-CTzYRyAx.js} +9 -9
- package/dist/{PasteHandlerPlugin-CSo_lOE8.js.map → PasteHandlerPlugin-CTzYRyAx.js.map} +1 -1
- package/dist/Repeater-DUo13Mq6.js +23 -0
- package/dist/Repeater-DUo13Mq6.js.map +1 -0
- package/dist/{Slider-Czd2xAGf.js → Slider-CqYFsgRL.js} +3 -3
- package/dist/{Slider-Czd2xAGf.js.map → Slider-CqYFsgRL.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-Bb2blXnq.js → TableCellResizerPlugin-D-fX5I3p.js} +12 -5
- package/dist/{TableCellResizerPlugin-Bb2blXnq.js.map → TableCellResizerPlugin-D-fX5I3p.js.map} +1 -1
- package/dist/assets/DataTable.css +1 -1
- package/dist/assets/Repeater.css +1 -1
- package/dist/{chunk-5WKL7XVT-CvOIS3NE.js → chunk-SNLGT2ZI--XVeLAcq.js} +2540 -2881
- package/dist/chunk-SNLGT2ZI--XVeLAcq.js.map +1 -0
- package/dist/{client-CXlG3hNo.js → client-CTHUtwUP.js} +4 -4
- package/dist/{client-CXlG3hNo.js.map → client-CTHUtwUP.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +15 -14
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +20 -19
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +26 -25
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +6 -5
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +5 -4
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +5 -4
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +20 -19
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +22 -21
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +20 -19
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.js +5 -4
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +9 -8
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +16 -15
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +3 -3
- package/dist/components/CheckboxTree/index.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/DataTable/DataTable.d.ts +3 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DataTable/DataTable.stories.js +47 -56
- package/dist/components/DataTable/DataTable.stories.js.map +1 -1
- package/dist/components/DataTable/index.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.stories.js +2 -2
- package/dist/components/FeedbackBar/FeedbackBar.test.js +8 -7
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/FeedbackBar/index.js +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.stories.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +2 -2
- package/dist/components/FormInput/index.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js +12 -11
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +5 -4
- package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +12 -11
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +8 -7
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +2 -2
- package/dist/components/PeriodSelector/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +10 -9
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +2 -2
- package/dist/components/RadioTabSelector/index.js +1 -1
- package/dist/components/Repeater/Repeater.d.ts +1 -1
- package/dist/components/Repeater/Repeater.js +1 -1
- package/dist/components/Repeater/Repeater.stories.js +1 -1
- package/dist/components/Repeater/index.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/EditorHeader/index.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js +1 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js +1 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +21 -21
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +12 -12
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/index.js +3 -3
- package/dist/components/RteEditor/RteEditor.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/helpers.js +5 -5
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +14 -14
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +20 -19
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +2 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.stories.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +2 -2
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +7 -6
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +14 -13
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +26 -25
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/hooks/useResponsive.js +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +5 -5
- package/dist/{components-CgBF6db6.js → components-D2rPfyIW.js} +438 -408
- package/dist/components-D2rPfyIW.js.map +1 -0
- package/dist/{dist-oLwM--0y.js → dist-CuwCMU7Y.js} +4 -4
- package/dist/{dist-oLwM--0y.js.map → dist-CuwCMU7Y.js.map} +1 -1
- package/dist/{react.esm-DwWzhs9e.js → dom.esm-S0SD0DBW.js} +938 -1029
- package/dist/dom.esm-S0SD0DBW.js.map +1 -0
- package/dist/{esm-BXzGXYWZ.js → esm-Bfz5h0_d.js} +5 -5
- package/dist/{esm-BXzGXYWZ.js.map → esm-Bfz5h0_d.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/{react-18-BwdnKC48.js → react-18-yf-KbRra.js} +3 -3
- package/dist/{react-18-BwdnKC48.js.map → react-18-yf-KbRra.js.map} +1 -1
- package/dist/react.esm-D50lAl1F.js +226 -0
- package/dist/react.esm-D50lAl1F.js.map +1 -0
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +22 -22
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-Gtly6H2f.js → test-BjtC-Q32.js} +3684 -6919
- package/dist/test-BjtC-Q32.js.map +1 -0
- package/package.json +16 -16
- package/dist/DataTable-Cgn_RKTA.js.map +0 -1
- package/dist/LexicalClipboard.prod-CS8a49uL.js.map +0 -1
- package/dist/LexicalHtml.prod-BtzosUOH.js +0 -1611
- package/dist/LexicalHtml.prod-BtzosUOH.js.map +0 -1
- package/dist/LexicalTable.prod-Bf0is-op.js.map +0 -1
- package/dist/LexicalUtils.prod-CjGUKarD.js +0 -259
- package/dist/LexicalUtils.prod-CjGUKarD.js.map +0 -1
- package/dist/Repeater-BAEfOMZI.js +0 -22
- package/dist/Repeater-BAEfOMZI.js.map +0 -1
- package/dist/chunk-5WKL7XVT-CvOIS3NE.js.map +0 -1
- package/dist/components-CgBF6db6.js.map +0 -1
- package/dist/helpers-MMNO9vlK.js +0 -34
- package/dist/helpers-MMNO9vlK.js.map +0 -1
- package/dist/react.esm-DwWzhs9e.js.map +0 -1
- package/dist/test-Gtly6H2f.js.map +0 -1
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../Accordion-DQNoRsg_.js";
|
|
4
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
5
|
+
import { t as r } from "../../esm-Bfz5h0_d.js";
|
|
5
6
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/Accordion/Accordion.test.tsx
|
|
7
8
|
describe("Accordion", () => {
|
|
8
9
|
it("should render", () => {
|
|
9
|
-
n(/* @__PURE__ */ i(
|
|
10
|
+
n(/* @__PURE__ */ i(t, {
|
|
10
11
|
title: "Test Accordion",
|
|
11
12
|
content: "Test Content"
|
|
12
13
|
}));
|
|
13
|
-
let r =
|
|
14
|
+
let r = e.getByText("Test Accordion");
|
|
14
15
|
expect(r).toBeInTheDocument(), expect(r).toHaveAttribute("aria-expanded", "false");
|
|
15
16
|
}), it("should display content when expanded by default", () => {
|
|
16
|
-
n(/* @__PURE__ */ i(
|
|
17
|
+
n(/* @__PURE__ */ i(t, {
|
|
17
18
|
title: "Test Accordion",
|
|
18
19
|
content: "Test Content",
|
|
19
20
|
expanded: !0
|
|
20
21
|
}));
|
|
21
|
-
let r =
|
|
22
|
+
let r = e.getByText("Test Accordion");
|
|
22
23
|
expect(r).toBeInTheDocument(), expect(r).toHaveAttribute("aria-expanded", "true");
|
|
23
24
|
}), it("should toggle content visibility on click", async () => {
|
|
24
|
-
n(/* @__PURE__ */ i(
|
|
25
|
+
n(/* @__PURE__ */ i(t, {
|
|
25
26
|
title: "Test Accordion",
|
|
26
27
|
content: "Test Content"
|
|
27
28
|
}));
|
|
28
|
-
let a =
|
|
29
|
+
let a = e.getByText("Test Accordion");
|
|
29
30
|
await r.click(a), expect(a).toHaveAttribute("aria-expanded", "true"), await r.click(a), expect(a).toHaveAttribute("aria-expanded", "false");
|
|
30
31
|
}), it("should toggle content visibility on Enter key press", async () => {
|
|
31
|
-
n(/* @__PURE__ */ i(
|
|
32
|
+
n(/* @__PURE__ */ i(t, {
|
|
32
33
|
title: "Test Accordion",
|
|
33
34
|
content: "Test Content"
|
|
34
35
|
}));
|
|
35
|
-
let a =
|
|
36
|
+
let a = e.getByText("Test Accordion");
|
|
36
37
|
await r.keyboard("[Tab]"), await r.keyboard("[Enter]"), expect(a).toHaveAttribute("aria-expanded", "true"), await r.keyboard("[Enter]"), expect(a).toHaveAttribute("aria-expanded", "false");
|
|
37
38
|
}), it("should toggle content visibility on Space key press", async () => {
|
|
38
|
-
n(/* @__PURE__ */ i(
|
|
39
|
+
n(/* @__PURE__ */ i(t, {
|
|
39
40
|
title: "Test Accordion",
|
|
40
41
|
content: "Test Content"
|
|
41
42
|
}));
|
|
42
|
-
let a =
|
|
43
|
+
let a = e.getByText("Test Accordion");
|
|
43
44
|
await r.keyboard("[Tab]"), await r.keyboard("[Space]"), expect(a).toHaveAttribute("aria-expanded", "true"), await r.keyboard("[Space]"), expect(a).toHaveAttribute("aria-expanded", "false");
|
|
44
45
|
});
|
|
45
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.test.js","names":[],"sources":["../../../src/components/Accordion/Accordion.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { Accordion } from './Accordion';\n\ndescribe('Accordion', () => {\n it('should render', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should display content when expanded by default', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" expanded />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n });\n\n it('should toggle content visibility on click', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Accordion.test.js","names":[],"sources":["../../../src/components/Accordion/Accordion.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { Accordion } from './Accordion';\n\ndescribe('Accordion', () => {\n it('should render', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should display content when expanded by default', () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" expanded />);\n const titleElement = screen.getByText('Test Accordion');\n expect(titleElement).toBeInTheDocument();\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n });\n\n it('should toggle content visibility on click', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.click(titleElement);\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Enter]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\n const titleElement = screen.getByText('Test Accordion');\n await userEvent.keyboard('[Tab]');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\n await userEvent.keyboard('[Space]');\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"mappings":";;;;;;;AAMA,SAAS,mBAAmB;CAkC1B,AAjCA,GAAG,uBAAuB;EACxB,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ;EAAgB,CAAA,CAAC;EAClE,IAAM,IAAe,EAAO,UAAU,gBAAgB;EAEtD,AADA,OAAO,CAAY,CAAC,CAAC,kBAAkB,GACvC,OAAO,CAAY,CAAC,CAAC,gBAAgB,iBAAiB,OAAO;CAC/D,CAAC,GAED,GAAG,yDAAyD;EAC1D,EAAO,kBAAC,GAAD;GAAW,OAAM;GAAiB,SAAQ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-1,49 +1,50 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
1
|
+
import { c as e, s as t } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t as n } from "../../AccordionCard-C4k8EI39.js";
|
|
4
|
+
import { n as r, t as i } from "../../react.esm-D50lAl1F.js";
|
|
5
|
+
import { t as a } from "../../esm-Bfz5h0_d.js";
|
|
5
6
|
import { jsx as o } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/AccordionCard/AccordionCard.test.tsx
|
|
7
8
|
describe("AccordionCard", () => {
|
|
8
9
|
it("should render", () => {
|
|
9
|
-
r(/* @__PURE__ */ o(
|
|
10
|
+
r(/* @__PURE__ */ o(n, {
|
|
10
11
|
title: "Test Accordion Card",
|
|
11
12
|
content: "TestComponent",
|
|
12
13
|
expanded: !0
|
|
13
|
-
})), expect(
|
|
14
|
+
})), expect(t.getByText("Test Accordion Card")).toBeInTheDocument(), expect(t.getByText("TestComponent")).toBeInTheDocument();
|
|
14
15
|
}), it("should display content when expanded by default", () => {
|
|
15
|
-
r(/* @__PURE__ */ o(
|
|
16
|
+
r(/* @__PURE__ */ o(n, {
|
|
16
17
|
title: "Test Accordion Card",
|
|
17
18
|
content: "TestComponent",
|
|
18
19
|
expanded: !0
|
|
19
|
-
})), expect(
|
|
20
|
+
})), expect(t.getByText("Test Accordion Card")).toBeInTheDocument(), expect(t.getByText("TestComponent")).toHaveClass("accordion-card__content--expanded");
|
|
20
21
|
}), it("should toggle content visibility on click", () => {
|
|
21
|
-
r(/* @__PURE__ */ o(
|
|
22
|
+
r(/* @__PURE__ */ o(n, {
|
|
22
23
|
title: "Test Accordion Card",
|
|
23
24
|
content: "TestComponent"
|
|
24
25
|
}));
|
|
25
|
-
let
|
|
26
|
-
expect(
|
|
26
|
+
let e = t.getByText("Test Accordion Card"), a = t.getByText("TestComponent");
|
|
27
|
+
expect(e).toBeInTheDocument(), i.click(e), expect(a).toHaveClass("accordion-card__content--expanded"), i.click(e), expect(a).not.toHaveClass("accordion-card__content--expanded");
|
|
27
28
|
}), it("should toggle content visibility on Enter key press", async () => {
|
|
28
|
-
r(/* @__PURE__ */ o(
|
|
29
|
+
r(/* @__PURE__ */ o(n, {
|
|
29
30
|
title: "Test Accordion Card",
|
|
30
31
|
content: "TestComponent"
|
|
31
32
|
}));
|
|
32
|
-
let i =
|
|
33
|
-
i.focus(), await a.keyboard("[Enter]"), await
|
|
33
|
+
let i = t.getByRole("button"), s = t.getByText("TestComponent");
|
|
34
|
+
i.focus(), await a.keyboard("[Enter]"), await e(() => {
|
|
34
35
|
expect(s).toHaveClass("accordion-card__content--expanded");
|
|
35
|
-
}), await a.keyboard("[Enter]"), await
|
|
36
|
+
}), await a.keyboard("[Enter]"), await e(() => {
|
|
36
37
|
expect(s).not.toHaveClass("accordion-card__content--expanded");
|
|
37
38
|
});
|
|
38
39
|
}), it("should toggle content visibility on Space key press", async () => {
|
|
39
|
-
r(/* @__PURE__ */ o(
|
|
40
|
+
r(/* @__PURE__ */ o(n, {
|
|
40
41
|
title: "Test Accordion Card",
|
|
41
42
|
content: "TestComponent"
|
|
42
43
|
}));
|
|
43
|
-
let i =
|
|
44
|
-
i.focus(), await a.keyboard("[Space]"), await
|
|
44
|
+
let i = t.getByRole("button"), s = t.getByText("TestComponent");
|
|
45
|
+
i.focus(), await a.keyboard("[Space]"), await e(() => {
|
|
45
46
|
expect(s).toHaveClass("accordion-card__content--expanded");
|
|
46
|
-
}), await a.keyboard("[Space]"), await
|
|
47
|
+
}), await a.keyboard("[Space]"), await e(() => {
|
|
47
48
|
expect(s).not.toHaveClass("accordion-card__content--expanded");
|
|
48
49
|
});
|
|
49
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionCard.test.js","names":[],"sources":["../../../src/components/AccordionCard/AccordionCard.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { AccordionCard } from './AccordionCard';\n\ndescribe('AccordionCard', () => {\n it('should render', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toBeInTheDocument();\n });\n\n it('should display content when expanded by default', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on click', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByText('Test Accordion Card');\n const contentElement = screen.getByText('TestComponent');\n expect(titleElement).toBeInTheDocument();\n fireEvent.click(titleElement);\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n fireEvent.click(titleElement);\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccordionCard.test.js","names":[],"sources":["../../../src/components/AccordionCard/AccordionCard.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { AccordionCard } from './AccordionCard';\n\ndescribe('AccordionCard', () => {\n it('should render', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toBeInTheDocument();\n });\n\n it('should display content when expanded by default', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\n expect(screen.getByText('TestComponent')).toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on click', () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByText('Test Accordion Card');\n const contentElement = screen.getByText('TestComponent');\n expect(titleElement).toBeInTheDocument();\n fireEvent.click(titleElement);\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n fireEvent.click(titleElement);\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n\n it('should toggle content visibility on Enter key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Enter]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n\n it('should toggle content visibility on Space key press', async () => {\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\n const titleElement = screen.getByRole('button');\n const contentElement = screen.getByText('TestComponent');\n titleElement.focus();\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\n });\n await userEvent.keyboard('[Space]');\n await waitFor(() => {\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\n });\n });\n});\n"],"mappings":";;;;;;;AAMA,SAAS,uBAAuB;CAuC9B,AAtCA,GAAG,uBAAuB;EAGxB,AAFA,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAiB,UAAA;EAAU,CAAA,CAAC,GACvF,OAAO,EAAO,UAAU,qBAAqB,CAAC,CAAC,CAAC,kBAAkB,GAClE,OAAO,EAAO,UAAU,eAAe,CAAC,CAAC,CAAC,kBAAkB;CAC9D,CAAC,GAED,GAAG,yDAAyD;EAG1D,AAFA,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;GAAiB,UAAA;EAAU,CAAA,CAAC,GACvF,OAAO,EAAO,UAAU,qBAAqB,CAAC,CAAC,CAAC,kBAAkB,GAClE,OAAO,EAAO,UAAU,eAAe,CAAC,CAAC,CAAC,YAAY,mCAAmC;CAC3F,CAAC,GAED,GAAG,mDAAmD;EACpD,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;EAAkB,CAAA,CAAC;EAC9E,IAAM,IAAe,EAAO,UAAU,qBAAqB,GACrD,IAAiB,EAAO,UAAU,eAAe;EAKvD,AAJA,OAAO,CAAY,CAAC,CAAC,kBAAkB,GACvC,EAAU,MAAM,CAAY,GAC5B,OAAO,CAAc,CAAC,CAAC,YAAY,mCAAmC,GACtE,EAAU,MAAM,CAAY,GAC5B,OAAO,CAAc,CAAC,CAAC,IAAI,YAAY,mCAAmC;CAC5E,CAAC,GAED,GAAG,uDAAuD,YAAY;EACpE,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;EAAkB,CAAA,CAAC;EAC9E,IAAM,IAAe,EAAO,UAAU,QAAQ,GACxC,IAAiB,EAAO,UAAU,eAAe;EAOvD,AANA,EAAa,MAAM,GACnB,MAAM,EAAU,SAAS,SAAS,GAClC,MAAM,QAAc;GAClB,OAAO,CAAc,CAAC,CAAC,YAAY,mCAAmC;EACxE,CAAC,GACD,MAAM,EAAU,SAAS,SAAS,GAClC,MAAM,QAAc;GAClB,OAAO,CAAc,CAAC,CAAC,IAAI,YAAY,mCAAmC;EAC5E,CAAC;CACH,CAAC,GAED,GAAG,uDAAuD,YAAY;EACpE,EAAO,kBAAC,GAAD;GAAe,OAAM;GAAsB,SAAS;EAAkB,CAAA,CAAC;EAC9E,IAAM,IAAe,EAAO,UAAU,QAAQ,GACxC,IAAiB,EAAO,UAAU,eAAe;EAOvD,AANA,EAAa,MAAM,GACnB,MAAM,EAAU,SAAS,SAAS,GAClC,MAAM,QAAc;GAClB,OAAO,CAAc,CAAC,CAAC,YAAY,mCAAmC;EACxE,CAAC,GACD,MAAM,EAAU,SAAS,SAAS,GAClC,MAAM,QAAc;GAClB,OAAO,CAAc,CAAC,CAAC,IAAI,YAAY,mCAAmC;EAC5E,CAAC;CACH,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as e, s as t } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t as n } from "../../ActionList-D2GC2qPX.js";
|
|
4
|
+
import { n as r } from "../../react.esm-D50lAl1F.js";
|
|
5
|
+
import { t as i } from "../../esm-Bfz5h0_d.js";
|
|
5
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/ActionList/ActionList.test.tsx
|
|
7
8
|
var o = jest.fn(), s = [
|
|
@@ -21,73 +22,73 @@ var o = jest.fn(), s = [
|
|
|
21
22
|
];
|
|
22
23
|
describe("ActionList", () => {
|
|
23
24
|
it("should render (variant primary)", () => {
|
|
24
|
-
r(/* @__PURE__ */ a(
|
|
25
|
+
r(/* @__PURE__ */ a(n, {
|
|
25
26
|
label: "Test ActionList",
|
|
26
27
|
variant: "primary",
|
|
27
28
|
iconName: "EllipsisVertical",
|
|
28
29
|
children: s.map((e) => e)
|
|
29
|
-
})), expect(
|
|
30
|
+
})), expect(t.getByText("Test ActionList")).toBeInTheDocument(), expect(t.getByText("Test ActionList")).toHaveClass("button--primary"), expect(t.getByText("Test Action 1")).toBeInTheDocument(), expect(t.getByText("Test Action 2")).toBeInTheDocument(), expect(t.getByText("Test Action 3")).toBeInTheDocument();
|
|
30
31
|
}), it("should render variant secondary", () => {
|
|
31
|
-
r(/* @__PURE__ */ a(
|
|
32
|
+
r(/* @__PURE__ */ a(n, {
|
|
32
33
|
label: "Test ActionList",
|
|
33
34
|
variant: "secondary",
|
|
34
35
|
iconName: "EllipsisVertical",
|
|
35
36
|
children: s.map((e) => e)
|
|
36
|
-
})), expect(
|
|
37
|
+
})), expect(t.getByText("Test ActionList")).toBeInTheDocument(), expect(t.getByText("Test ActionList")).toHaveClass("button--secondary");
|
|
37
38
|
}), it("should render variant destructive-primary", () => {
|
|
38
|
-
r(/* @__PURE__ */ a(
|
|
39
|
+
r(/* @__PURE__ */ a(n, {
|
|
39
40
|
label: "Test ActionList",
|
|
40
41
|
variant: "destructive-primary",
|
|
41
42
|
iconName: "EllipsisVertical",
|
|
42
43
|
children: s.map((e) => e)
|
|
43
|
-
})), expect(
|
|
44
|
+
})), expect(t.getByText("Test ActionList")).toBeInTheDocument(), expect(t.getByText("Test ActionList")).toHaveClass("button--destructive-primary");
|
|
44
45
|
}), it("should render variant destructive-secondary", () => {
|
|
45
|
-
r(/* @__PURE__ */ a(
|
|
46
|
+
r(/* @__PURE__ */ a(n, {
|
|
46
47
|
label: "Test ActionList",
|
|
47
48
|
variant: "destructive-secondary",
|
|
48
49
|
iconName: "EllipsisVertical",
|
|
49
50
|
children: s.map((e) => e)
|
|
50
|
-
})), expect(
|
|
51
|
+
})), expect(t.getByText("Test ActionList")).toBeInTheDocument(), expect(t.getByText("Test ActionList")).toHaveClass("button--destructive-secondary");
|
|
51
52
|
}), it("should render variant blank", () => {
|
|
52
|
-
r(/* @__PURE__ */ a(
|
|
53
|
+
r(/* @__PURE__ */ a(n, {
|
|
53
54
|
label: "Test ActionList",
|
|
54
55
|
variant: "blank",
|
|
55
56
|
iconName: "EllipsisVertical",
|
|
56
57
|
children: s.map((e) => e)
|
|
57
|
-
})), expect(
|
|
58
|
+
})), expect(t.getByText("Test ActionList")).toBeInTheDocument(), expect(t.getByText("Test ActionList")).toHaveClass("button--blank");
|
|
58
59
|
}), it("should render variant blank-icon", () => {
|
|
59
|
-
r(/* @__PURE__ */ a(
|
|
60
|
+
r(/* @__PURE__ */ a(n, {
|
|
60
61
|
label: "Test ActionList",
|
|
61
62
|
variant: "blank-icon",
|
|
62
63
|
iconName: "EllipsisVertical",
|
|
63
64
|
children: s.map((e) => e)
|
|
64
|
-
})), expect(
|
|
65
|
+
})), expect(t.getByText("Test ActionList")).toBeInTheDocument(), expect(t.getByText("Test ActionList")).toHaveClass("button--blank-icon");
|
|
65
66
|
}), it("should toggle content visibility on click", async () => {
|
|
66
|
-
r(/* @__PURE__ */ a(
|
|
67
|
+
r(/* @__PURE__ */ a(n, {
|
|
67
68
|
label: "Test ActionList",
|
|
68
69
|
variant: "blank-icon",
|
|
69
70
|
iconName: "EllipsisVertical",
|
|
70
71
|
children: s.map((e) => e)
|
|
71
72
|
}));
|
|
72
|
-
let o =
|
|
73
|
-
expect(o).toBeInTheDocument(), expect(c).toBeInTheDocument(), await i.click(o), await
|
|
73
|
+
let o = t.getByText("Test ActionList"), c = t.getByRole("menu");
|
|
74
|
+
expect(o).toBeInTheDocument(), expect(c).toBeInTheDocument(), await i.click(o), await e(() => {
|
|
74
75
|
expect(c).toHaveClass("action-list--open");
|
|
75
|
-
}), await i.click(o), await
|
|
76
|
+
}), await i.click(o), await e(() => {
|
|
76
77
|
expect(c).not.toHaveClass("action-list--open");
|
|
77
78
|
});
|
|
78
79
|
}), it("should fire action on click on action button", async () => {
|
|
79
|
-
r(/* @__PURE__ */ a(
|
|
80
|
+
r(/* @__PURE__ */ a(n, {
|
|
80
81
|
label: "Test ActionList",
|
|
81
82
|
variant: "blank-icon",
|
|
82
83
|
iconName: "EllipsisVertical",
|
|
83
84
|
children: s.map((e) => e)
|
|
84
85
|
}));
|
|
85
|
-
let c =
|
|
86
|
-
expect(c).toBeInTheDocument(), expect(l).toBeInTheDocument(), await i.click(c), await
|
|
86
|
+
let c = t.getByText("Test ActionList"), l = t.getByRole("menu");
|
|
87
|
+
expect(c).toBeInTheDocument(), expect(l).toBeInTheDocument(), await i.click(c), await e(() => {
|
|
87
88
|
expect(l).toHaveClass("action-list--open");
|
|
88
89
|
});
|
|
89
|
-
let u =
|
|
90
|
-
await i.click(u), expect(o).toHaveBeenCalledTimes(1), await
|
|
90
|
+
let u = t.getByText("Test Action 1");
|
|
91
|
+
await i.click(u), expect(o).toHaveBeenCalledTimes(1), await e(() => {
|
|
91
92
|
expect(l).not.toHaveClass("action-list--open");
|
|
92
93
|
});
|
|
93
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.test.js","names":[],"sources":["../../../src/components/ActionList/ActionList.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { ActionList } from './ActionList';\n\nconst onClickSpy = jest.fn();\n\nconst BUTTON_LIST = [\n <button key=\"1\" type=\"button\" onClick={onClickSpy}>\n Test Action 1\n </button>,\n <button key=\"2\" type=\"button\">\n Test Action 2\n </button>,\n <button key=\"3\" type=\"button\">\n Test Action 3\n </button>,\n];\n\ndescribe('ActionList', () => {\n it('should render (variant primary)', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--primary');\n expect(screen.getByText('Test Action 1')).toBeInTheDocument();\n expect(screen.getByText('Test Action 2')).toBeInTheDocument();\n expect(screen.getByText('Test Action 3')).toBeInTheDocument();\n });\n\n it('should render variant secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--secondary');\n });\n\n it('should render variant destructive-primary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-primary');\n });\n\n it('should render variant destructive-secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render variant blank', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank');\n });\n\n it('should render variant blank-icon', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank-icon');\n });\n\n it('should toggle content visibility on click', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n\n it('should fire action on click on action button', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n const actionButton = screen.getByText('Test Action 1');\n await userEvent.click(actionButton);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionList.test.js","names":[],"sources":["../../../src/components/ActionList/ActionList.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { ActionList } from './ActionList';\n\nconst onClickSpy = jest.fn();\n\nconst BUTTON_LIST = [\n <button key=\"1\" type=\"button\" onClick={onClickSpy}>\n Test Action 1\n </button>,\n <button key=\"2\" type=\"button\">\n Test Action 2\n </button>,\n <button key=\"3\" type=\"button\">\n Test Action 3\n </button>,\n];\n\ndescribe('ActionList', () => {\n it('should render (variant primary)', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--primary');\n expect(screen.getByText('Test Action 1')).toBeInTheDocument();\n expect(screen.getByText('Test Action 2')).toBeInTheDocument();\n expect(screen.getByText('Test Action 3')).toBeInTheDocument();\n });\n\n it('should render variant secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--secondary');\n });\n\n it('should render variant destructive-primary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-primary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-primary');\n });\n\n it('should render variant destructive-secondary', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"destructive-secondary\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render variant blank', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank');\n });\n\n it('should render variant blank-icon', () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n expect(screen.getByText('Test ActionList')).toBeInTheDocument();\n expect(screen.getByText('Test ActionList')).toHaveClass('button--blank-icon');\n });\n\n it('should toggle content visibility on click', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n\n it('should fire action on click on action button', async () => {\n render(\n <ActionList label=\"Test ActionList\" variant=\"blank-icon\" iconName=\"EllipsisVertical\">\n {BUTTON_LIST.map((button) => button)}\n </ActionList>\n );\n const triggerElement = screen.getByText('Test ActionList');\n const actionListElement = screen.getByRole('menu');\n expect(triggerElement).toBeInTheDocument();\n expect(actionListElement).toBeInTheDocument();\n await userEvent.click(triggerElement);\n await waitFor(() => {\n expect(actionListElement).toHaveClass('action-list--open');\n });\n const actionButton = screen.getByText('Test Action 1');\n await userEvent.click(actionButton);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n await waitFor(() => {\n expect(actionListElement).not.toHaveClass('action-list--open');\n });\n });\n});\n"],"mappings":";;;;;;;AAMA,IAAM,IAAa,KAAK,GAAG,GAErB,IAAc;CAClB,kBAAC,UAAD;EAAgB,MAAK;EAAS,SAAS;YAAY;CAE3C,GAFI,GAEJ;CACR,kBAAC,UAAD;EAAgB,MAAK;YAAS;CAEtB,GAFI,GAEJ;CACR,kBAAC,UAAD;EAAgB,MAAK;YAAS;CAEtB,GAFI,GAEJ;AACV;AAEA,SAAS,oBAAoB;CAoF3B,AAnFA,GAAG,yCAAyC;EAU1C,AATA,EACE,kBAAC,GAAD;GAAY,OAAM;GAAkB,SAAQ;GAAU,UAAS;aAC5D,EAAY,KAAK,MAAW,CAAM;EACzB,CAAA,CACd,GACA,OAAO,EAAO,UAAU,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,GAC9D,OAAO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c;GAClB,OAAO,CAAiB,CAAC,CAAC,YAAY,mBAAmB;EAC3D,CAAC;EACD,IAAM,IAAe,EAAO,UAAU,eAAe;EAGrD,AAFA,MAAM,EAAU,MAAM,CAAY,GAClC,OAAO,CAAU,CAAC,CAAC,sBAAsB,CAAC,GAC1C,MAAM,QAAc;GAClB,OAAO,CAAiB,CAAC,CAAC,IAAI,YAAY,mBAAmB;EAC/D,CAAC;CACH,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../AppStatusBar-DW-w7Nzp.js";
|
|
4
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/AppStatusBar/AppStatusBar.test.tsx
|
|
6
7
|
describe("AppStatusBar", () => {
|
|
7
8
|
it("should render", () => {
|
|
8
|
-
n(/* @__PURE__ */ r(
|
|
9
|
+
n(/* @__PURE__ */ r(t, {
|
|
9
10
|
message: "AppStatusBar message",
|
|
10
11
|
severity: "info"
|
|
11
|
-
})), expect(
|
|
12
|
+
})), expect(e.getByText("AppStatusBar message")).toBeInTheDocument();
|
|
12
13
|
});
|
|
13
14
|
});
|
|
14
15
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppStatusBar.test.js","names":[],"sources":["../../../src/components/AppStatusBar/AppStatusBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { AppStatusBar } from './AppStatusBar';\n\ndescribe('AppStatusBar', () => {\n it('should render', () => {\n render(<AppStatusBar message=\"AppStatusBar message\" severity=\"info\" />);\n expect(screen.getByText('AppStatusBar message')).toBeInTheDocument();\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppStatusBar.test.js","names":[],"sources":["../../../src/components/AppStatusBar/AppStatusBar.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { AppStatusBar } from './AppStatusBar';\n\ndescribe('AppStatusBar', () => {\n it('should render', () => {\n render(<AppStatusBar message=\"AppStatusBar message\" severity=\"info\" />);\n expect(screen.getByText('AppStatusBar message')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;;AAKA,SAAS,sBAAsB;CAC7B,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD;GAAc,SAAQ;GAAuB,UAAS;EAAQ,CAAA,CAAC,GACtE,OAAO,EAAO,UAAU,sBAAsB,CAAC,CAAC,CAAC,kBAAkB;CACrE,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../Attention-xqGAJ7-T.js";
|
|
4
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/Attention/Attention.test.tsx
|
|
6
7
|
describe("Attention", () => {
|
|
7
8
|
it("should render (variant primary)", () => {
|
|
8
|
-
n(/* @__PURE__ */ r(
|
|
9
|
+
n(/* @__PURE__ */ r(t, { children: "Attention message" })), expect(e.getByText("Attention message")).toBeInTheDocument();
|
|
9
10
|
});
|
|
10
11
|
});
|
|
11
12
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attention.test.js","names":[],"sources":["../../../src/components/Attention/Attention.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Attention } from './Attention';\n\ndescribe('Attention', () => {\n it('should render (variant primary)', () => {\n render(<Attention>Attention message</Attention>);\n expect(screen.getByText('Attention message')).toBeInTheDocument();\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Attention.test.js","names":[],"sources":["../../../src/components/Attention/Attention.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Attention } from './Attention';\n\ndescribe('Attention', () => {\n it('should render (variant primary)', () => {\n render(<Attention>Attention message</Attention>);\n expect(screen.getByText('Attention message')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;;AAKA,SAAS,mBAAmB;CAC1B,GAAG,yCAAyC;EAE1C,AADA,EAAO,kBAAC,GAAD,EAAA,UAAW,oBAA4B,CAAA,CAAC,GAC/C,OAAO,EAAO,UAAU,mBAAmB,CAAC,CAAC,CAAC,kBAAkB;CAClE,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../Backdrop-bQ8kXsge.js";
|
|
4
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/Backdrop/Backdrop.test.tsx
|
|
6
7
|
describe("Backdrop", () => {
|
|
7
8
|
it("should render", () => {
|
|
8
|
-
n(/* @__PURE__ */ r(
|
|
9
|
+
n(/* @__PURE__ */ r(t, { children: "Backdrop overlay" })), expect(e.getByText("Backdrop overlay")).toBeInTheDocument();
|
|
9
10
|
});
|
|
10
11
|
});
|
|
11
12
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backdrop.test.js","names":[],"sources":["../../../src/components/Backdrop/Backdrop.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Backdrop } from './Backdrop';\n\ndescribe('Backdrop', () => {\n it('should render', () => {\n render(<Backdrop>Backdrop overlay</Backdrop>);\n expect(screen.getByText('Backdrop overlay')).toBeInTheDocument();\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Backdrop.test.js","names":[],"sources":["../../../src/components/Backdrop/Backdrop.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Backdrop } from './Backdrop';\n\ndescribe('Backdrop', () => {\n it('should render', () => {\n render(<Backdrop>Backdrop overlay</Backdrop>);\n expect(screen.getByText('Backdrop overlay')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;;AAKA,SAAS,kBAAkB;CACzB,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD,EAAA,UAAU,mBAA0B,CAAA,CAAC,GAC5C,OAAO,EAAO,UAAU,kBAAkB,CAAC,CAAC,CAAC,kBAAkB;CACjE,CAAC;AACH,CAAC"}
|
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { Button as t } from "./Button.js";
|
|
4
|
+
import { n, t as r } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/Buttons/Button.test.tsx
|
|
6
7
|
var a = jest.fn();
|
|
7
8
|
describe("Button", () => {
|
|
8
9
|
it("should render primary", () => {
|
|
9
|
-
n(/* @__PURE__ */ i(
|
|
10
|
+
n(/* @__PURE__ */ i(t, {
|
|
10
11
|
variant: "primary",
|
|
11
12
|
children: "Test Button"
|
|
12
|
-
})), expect(
|
|
13
|
+
})), expect(e.getByText("Test Button")).toBeInTheDocument();
|
|
13
14
|
}), it("should render secondary", () => {
|
|
14
|
-
n(/* @__PURE__ */ i(
|
|
15
|
+
n(/* @__PURE__ */ i(t, {
|
|
15
16
|
variant: "secondary",
|
|
16
17
|
children: "Test Button"
|
|
17
|
-
})), expect(
|
|
18
|
+
})), expect(e.getByText("Test Button")).toBeInTheDocument(), expect(e.getByText("Test Button")).toHaveClass("button--secondary");
|
|
18
19
|
}), it("should render destructive-primary", () => {
|
|
19
|
-
n(/* @__PURE__ */ i(
|
|
20
|
+
n(/* @__PURE__ */ i(t, {
|
|
20
21
|
variant: "destructive-primary",
|
|
21
22
|
children: "Test Button"
|
|
22
|
-
})), expect(
|
|
23
|
+
})), expect(e.getByText("Test Button")).toBeInTheDocument(), expect(e.getByText("Test Button")).toHaveClass("button--destructive-primary");
|
|
23
24
|
}), it("should render destructive-secondary", () => {
|
|
24
|
-
n(/* @__PURE__ */ i(
|
|
25
|
+
n(/* @__PURE__ */ i(t, {
|
|
25
26
|
variant: "destructive-secondary",
|
|
26
27
|
children: "Test Button"
|
|
27
|
-
})), expect(
|
|
28
|
+
})), expect(e.getByText("Test Button")).toBeInTheDocument(), expect(e.getByText("Test Button")).toHaveClass("button--destructive-secondary");
|
|
28
29
|
}), it("should render blank", () => {
|
|
29
|
-
n(/* @__PURE__ */ i(
|
|
30
|
+
n(/* @__PURE__ */ i(t, {
|
|
30
31
|
variant: "blank",
|
|
31
32
|
children: "Test Button"
|
|
32
|
-
})), expect(
|
|
33
|
+
})), expect(e.getByText("Test Button")).toBeInTheDocument(), expect(e.getByText("Test Button")).toHaveClass("button--blank");
|
|
33
34
|
}), it("should render as column", () => {
|
|
34
|
-
n(/* @__PURE__ */ i(
|
|
35
|
+
n(/* @__PURE__ */ i(t, {
|
|
35
36
|
variant: "primary",
|
|
36
37
|
displayColumn: !0,
|
|
37
38
|
children: "Test Button"
|
|
38
|
-
})), expect(
|
|
39
|
+
})), expect(e.getByText("Test Button")).toBeInTheDocument(), expect(e.getByText("Test Button")).toHaveClass("button--wide-column");
|
|
39
40
|
}), it("should render disabled", () => {
|
|
40
|
-
n(/* @__PURE__ */ i(
|
|
41
|
+
n(/* @__PURE__ */ i(t, {
|
|
41
42
|
variant: "primary",
|
|
42
43
|
disabled: !0,
|
|
43
44
|
children: "Test Button"
|
|
44
45
|
}));
|
|
45
|
-
let o =
|
|
46
|
+
let o = e.getByText("Test Button");
|
|
46
47
|
expect(o).toBeInTheDocument(), expect(o).toHaveAttribute("disabled"), r.click(o), expect(a).toHaveBeenCalledTimes(0);
|
|
47
48
|
}), it("should call onClick when clicked", () => {
|
|
48
|
-
n(/* @__PURE__ */ i(
|
|
49
|
+
n(/* @__PURE__ */ i(t, {
|
|
49
50
|
variant: "primary",
|
|
50
51
|
onClick: a,
|
|
51
52
|
children: "Test Button"
|
|
52
53
|
}));
|
|
53
|
-
let o =
|
|
54
|
+
let o = e.getByText("Test Button");
|
|
54
55
|
expect(o).toBeInTheDocument(), r.click(o), expect(a).toHaveBeenCalledTimes(1);
|
|
55
56
|
});
|
|
56
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.test.js","names":[],"sources":["../../../src/components/Buttons/Button.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\n\nimport { Button } from './Button';\n\nconst onClickSpy = jest.fn();\n\ndescribe('Button', () => {\n it('should render primary', () => {\n render(<Button variant=\"primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n });\n\n it('should render secondary', () => {\n render(<Button variant=\"secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n render(<Button variant=\"destructive-primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n render(<Button variant=\"destructive-secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n render(<Button variant=\"blank\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--blank');\n });\n\n it('should render as column', () => {\n render(\n <Button variant=\"primary\" displayColumn>\n Test Button\n </Button>\n );\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--wide-column');\n });\n\n it('should render disabled', () => {\n render(\n <Button variant=\"primary\" disabled>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('disabled');\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(0);\n });\n\n it('should call onClick when clicked', () => {\n render(\n <Button variant=\"primary\" onClick={onClickSpy}>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.test.js","names":[],"sources":["../../../src/components/Buttons/Button.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { fireEvent, render, screen } from '@testing-library/react';\n\nimport { Button } from './Button';\n\nconst onClickSpy = jest.fn();\n\ndescribe('Button', () => {\n it('should render primary', () => {\n render(<Button variant=\"primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n });\n\n it('should render secondary', () => {\n render(<Button variant=\"secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--secondary');\n });\n\n it('should render destructive-primary', () => {\n render(<Button variant=\"destructive-primary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-primary');\n });\n\n it('should render destructive-secondary', () => {\n render(<Button variant=\"destructive-secondary\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--destructive-secondary');\n });\n\n it('should render blank', () => {\n render(<Button variant=\"blank\">Test Button</Button>);\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--blank');\n });\n\n it('should render as column', () => {\n render(\n <Button variant=\"primary\" displayColumn>\n Test Button\n </Button>\n );\n expect(screen.getByText('Test Button')).toBeInTheDocument();\n expect(screen.getByText('Test Button')).toHaveClass('button--wide-column');\n });\n\n it('should render disabled', () => {\n render(\n <Button variant=\"primary\" disabled>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('disabled');\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(0);\n });\n\n it('should call onClick when clicked', () => {\n render(\n <Button variant=\"primary\" onClick={onClickSpy}>\n Test Button\n </Button>\n );\n const button = screen.getByText('Test Button');\n expect(button).toBeInTheDocument();\n fireEvent.click(button);\n expect(onClickSpy).toHaveBeenCalledTimes(1);\n });\n});\n"],"mappings":";;;;;;AAKA,IAAM,IAAa,KAAK,GAAG;AAE3B,SAAS,gBAAgB;CAqDvB,AApDA,GAAG,+BAA+B;EAEhC,AADA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAU;EAAmB,CAAA,CAAC,GACrD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,CAAC,kBAAkB;CAC5D,CAAC,GAED,GAAG,iCAAiC;EAGlC,AAFA,EAAO,kBAAC,GAAD;GAAQ,SAAQ;aAAY;EAAmB,CAAA,CAAC,GACvD,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,CAAC,kBAAkB,GAC1D,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,CAAC,YAAY,mBAAmB;CACzE,CAAC,GAED,GAAG,2CAA2C;EAG5C,AAFA,EAAO,kBAAC,GAA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;EAEvC,CAAA,CACV;EACA,IAAM,IAAS,EAAO,UAAU,aAAa;EAG7C,AAFA,OAAO,CAAM,CAAC,CAAC,kBAAkB,GACjC,EAAU,MAAM,CAAM,GACtB,OAAO,CAAU,CAAC,CAAC,sBAAsB,CAAC;CAC5C,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../test-
|
|
1
|
+
import { r as e } from "../../test-BjtC-Q32.js";
|
|
2
2
|
import { LinkButton as t } from "./LinkButton.js";
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { BrowserRouter as a } from "react-router";
|