xmlui 0.10.12 → 0.10.14
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/lib/{index-CDOoBf2R.mjs → index-779mp2Bm.mjs} +1508 -1287
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-BAV9RKui.mjs → initMock-CAXdczCj.mjs} +1 -1
- package/dist/lib/scss/components-core/theming/_themes.scss +1 -1
- package/dist/lib/xmlui.d.ts +17 -2
- package/dist/lib/xmlui.mjs +33 -32
- package/dist/metadata/{collectedComponentMetadata-Dp8BqWQO.mjs → collectedComponentMetadata-7DFXlw-J.mjs} +14957 -14751
- package/dist/metadata/{initMock-BvEO8W8r.mjs → initMock-AFWEftc6.mjs} +1 -1
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +3 -3
- package/dist/scripts/bin/build-lib.js +21 -13
- package/dist/scripts/bin/viteConfig.js +3 -1
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/abstractions/scripting/Token.js +2 -0
- package/dist/scripts/src/abstractions/scripting/TryScope.js +2 -0
- package/dist/scripts/src/abstractions/scripting/modules.js +2 -0
- package/dist/scripts/src/components/APICall/APICall.spec.js +910 -0
- package/dist/scripts/src/components/Accordion/Accordion.spec.js +969 -0
- package/dist/scripts/src/components/Animation/Animation.js +50 -0
- package/dist/scripts/src/components/App/App.spec.js +219 -0
- package/dist/scripts/src/components/AppHeader/AppHeader.spec.js +169 -0
- package/dist/scripts/src/components/AppState/AppState.spec.js +268 -0
- package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +383 -0
- package/dist/scripts/src/components/Avatar/Avatar.spec.js +1543 -0
- package/dist/scripts/src/components/Backdrop/Backdrop.spec.js +131 -0
- package/dist/scripts/src/components/Badge/Badge.spec.js +2214 -0
- package/dist/scripts/src/components/Bookmark/Bookmark.spec.js +230 -0
- package/dist/scripts/src/components/Breakout/Breakout.spec.js +56 -0
- package/dist/scripts/src/components/Button/Button-style.spec.js +274 -0
- package/dist/scripts/src/components/Button/Button.spec.js +454 -0
- package/dist/scripts/src/components/Card/Card.spec.js +150 -0
- package/dist/scripts/src/components/Carousel/Carousel.spec.js +343 -0
- package/dist/scripts/src/components/Carousel/CarouselNative.js +2 -2
- package/dist/scripts/src/components/ChangeListener/ChangeListener.spec.js +169 -0
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.spec.js +999 -0
- package/dist/scripts/src/components/Charts/BarChart/BarChart.spec.js +597 -0
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.spec.js +608 -0
- package/dist/scripts/src/components/Charts/LabelList/LabelList.spec.js +539 -0
- package/dist/scripts/src/components/Charts/Legend/Legend.spec.js +558 -0
- package/dist/scripts/src/components/Charts/LineChart/LineChart.spec.js +450 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChart.spec.js +584 -0
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.spec.js +571 -0
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.spec.js +449 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.spec.js +964 -0
- package/dist/scripts/src/components/CodeBlock/CodeBlock.spec.js +196 -0
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +3 -3
- package/dist/scripts/src/components/ColorPicker/ColorPicker.spec.js +283 -0
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +16 -5
- package/dist/scripts/src/components/Column/doc-resources/list-component-data.js +53 -0
- package/dist/scripts/src/components/ComponentProvider.js +6 -6
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +338 -0
- package/dist/scripts/src/components/DateInput/DateInput.spec.js +918 -0
- package/dist/scripts/src/components/DatePicker/DatePicker.spec.js +362 -0
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +3 -3
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +331 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +1 -1
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.spec.js +29 -0
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.spec.js +435 -0
- package/dist/scripts/src/components/FileInput/FileInput.spec.js +249 -0
- package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -10
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.spec.js +296 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +1 -1
- package/dist/scripts/src/components/FlowLayout/FlowLayout.spec.js +518 -0
- package/dist/scripts/src/components/Footer/Footer.spec.js +991 -0
- package/dist/scripts/src/components/Form/Form.js +6 -0
- package/dist/scripts/src/components/Form/Form.spec.js +1257 -0
- package/dist/scripts/src/components/Form/FormNative.js +13 -3
- package/dist/scripts/src/components/FormItem/FormItem.spec.js +723 -0
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +2 -2
- package/dist/scripts/src/components/FormSection/FormSection.js +6 -31
- package/dist/scripts/src/components/Fragment/Fragment.js +5 -1
- package/dist/scripts/src/components/Fragment/Fragment.spec.js +50 -0
- package/dist/scripts/src/components/Heading/H1.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H2.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H3.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H4.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H5.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H6.spec.js +66 -0
- package/dist/scripts/src/components/Heading/Heading.js +0 -12
- package/dist/scripts/src/components/Heading/Heading.spec.js +897 -0
- package/dist/scripts/src/components/HtmlTags/HtmlTags.spec.js +69 -0
- package/dist/scripts/src/components/IFrame/IFrame.spec.js +527 -0
- package/dist/scripts/src/components/Icon/ArrowDropDown.js +11 -0
- package/dist/scripts/src/components/Icon/ArrowDropUp.js +11 -0
- package/dist/scripts/src/components/Icon/ArrowLeft.js +11 -0
- package/dist/scripts/src/components/Icon/ArrowRight.js +11 -0
- package/dist/scripts/src/components/Icon/ChevronDownIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronUpIcon.js +7 -0
- package/dist/scripts/src/components/Icon/Icon.spec.js +527 -0
- package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
- package/dist/scripts/src/components/Image/Image.js +2 -1
- package/dist/scripts/src/components/Image/Image.spec.js +198 -0
- package/dist/scripts/src/components/Image/ImageNative.js +30 -2
- package/dist/scripts/src/components/Input/InputLabel.js +25 -0
- package/dist/scripts/src/components/Input/index.js +5 -0
- package/dist/scripts/src/components/Items/Items.spec.js +397 -0
- package/dist/scripts/src/components/Link/Link.spec.js +894 -0
- package/dist/scripts/src/components/List/List.spec.js +927 -0
- package/dist/scripts/src/components/List/doc-resources/list-component-data.js +53 -0
- package/dist/scripts/src/components/Markdown/Markdown.spec.js +188 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +1 -1
- package/dist/scripts/src/components/ModalDialog/ModalDialog.spec.js +162 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +1 -1
- package/dist/scripts/src/components/NavGroup/NavGroup.spec.js +153 -0
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +2 -2
- package/dist/scripts/src/components/NavLink/NavLink.spec.js +864 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.spec.js +864 -0
- package/dist/scripts/src/components/NoResult/NoResult.spec.js +863 -0
- package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +1231 -0
- package/dist/scripts/src/components/Option/Option.spec.js +472 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.spec.js +80 -0
- package/dist/scripts/src/components/Pagination/Pagination.spec.js +1003 -0
- package/dist/scripts/src/components/ProfileMenu/ProfileMenu.js +20 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.spec.js +166 -0
- package/dist/scripts/src/components/Queue/Queue.spec.js +626 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +479 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +17 -1
- package/dist/scripts/src/components/Redirect/Redirect.spec.js +527 -0
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.spec.js +76 -0
- package/dist/scripts/src/components/Select/Select.spec.js +527 -0
- package/dist/scripts/src/components/Slider/Slider.js +2 -0
- package/dist/scripts/src/components/Slider/Slider.spec.js +574 -0
- package/dist/scripts/src/components/Slider/SliderNative.js +62 -25
- package/dist/scripts/src/components/Slot/Slot.spec.js +368 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.spec.js +184 -0
- package/dist/scripts/src/components/Spinner/Spinner.spec.js +161 -0
- package/dist/scripts/src/components/Splitter/HSplitter.spec.js +104 -0
- package/dist/scripts/src/components/Splitter/Splitter.spec.js +543 -0
- package/dist/scripts/src/components/Splitter/VSplitter.spec.js +104 -0
- package/dist/scripts/src/components/Stack/CHStack.spec.js +86 -0
- package/dist/scripts/src/components/Stack/CVStack.spec.js +86 -0
- package/dist/scripts/src/components/Stack/HStack.spec.js +67 -0
- package/dist/scripts/src/components/Stack/Stack.spec.js +654 -0
- package/dist/scripts/src/components/Stack/VStack.spec.js +67 -0
- package/dist/scripts/src/components/Switch/Switch.spec.js +829 -0
- package/dist/scripts/src/components/Table/Table.js +8 -5
- package/dist/scripts/src/components/Table/Table.spec.js +555 -0
- package/dist/scripts/src/components/Table/TableNative.js +1 -1
- package/dist/scripts/src/components/Table/doc-resources/list-component-data.js +53 -0
- package/dist/scripts/src/components/TableOfContents/TableOfContents.spec.js +838 -0
- package/dist/scripts/src/components/Tabs/Tabs.spec.js +875 -0
- package/dist/scripts/src/components/Text/Text.js +0 -13
- package/dist/scripts/src/components/Text/Text.spec.js +1075 -0
- package/dist/scripts/src/components/TextArea/TextArea.spec.js +714 -0
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +8 -1
- package/dist/scripts/src/components/TextBox/TextBox.spec.js +643 -0
- package/dist/scripts/src/components/Theme/NotificationToast.js +4 -1
- package/dist/scripts/src/components/Theme/Theme.spec.js +124 -0
- package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +1122 -0
- package/dist/scripts/src/components/Timer/Timer.spec.js +358 -0
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.spec.js +414 -0
- package/dist/scripts/src/components/ToneSwitch/ToneSwitch.spec.js +89 -0
- package/dist/scripts/src/components/Tooltip/Tooltip.spec.js +418 -0
- package/dist/scripts/src/components/chart-color-schemes.js +43 -0
- package/dist/scripts/src/components-core/CompoundComponent.js +5 -5
- package/dist/scripts/src/components-core/RestApiProxy.js +89 -11
- package/dist/scripts/src/components-core/devtools/InspectorDialogVisibilityContext.js +8 -0
- package/dist/scripts/src/components-core/renderers.js +31 -0
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +1 -1
- package/dist/scripts/src/components-core/rendering/Container.js +19 -8
- package/dist/scripts/src/components-core/rendering/reducer.js +1 -1
- package/dist/scripts/src/components-core/script-runner/simplify-expression.js +386 -0
- package/dist/scripts/src/components-core/theming/component-layout-resolver.js +153 -0
- package/dist/scripts/src/components-core/theming/parse-layout-props.js +98 -0
- package/dist/scripts/src/components-core/theming/themes/root.js +13 -20
- package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
- package/dist/scripts/src/components-core/utils/audio-utils.js +83 -0
- package/dist/scripts/src/index-standalone.js +61 -0
- package/dist/scripts/src/index.js +2 -1
- package/dist/scripts/src/language-server/server-common.js +151 -0
- package/dist/scripts/src/language-server/server-web-worker.js +47 -0
- package/dist/scripts/src/language-server/server.js +42 -0
- package/dist/scripts/src/language-server/services/common/docs-generation.js +73 -0
- package/dist/scripts/src/language-server/services/common/lsp-utils.js +9 -0
- package/dist/scripts/src/language-server/services/common/syntax-node-utilities.js +135 -0
- package/dist/scripts/src/language-server/services/completion.js +270 -0
- package/dist/scripts/src/language-server/services/diagnostic.js +19 -0
- package/dist/scripts/src/language-server/services/format.js +430 -0
- package/dist/scripts/src/language-server/services/hover.js +164 -0
- package/dist/scripts/src/language-server/xmlui-metadata-generated.mjs +16266 -0
- package/dist/scripts/src/logging/xmlui.js +21 -0
- package/dist/scripts/src/parsers/common/utils.js +19 -0
- package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +286 -0
- package/dist/scripts/src/syntax/monaco/index.js +14 -0
- package/dist/scripts/src/syntax/monaco/xmlui-dark.js +25 -0
- package/dist/scripts/src/syntax/monaco/xmlui-light.js +25 -0
- package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +310 -0
- package/dist/scripts/src/syntax/textMate/index.js +14 -0
- package/dist/scripts/src/syntax/textMate/xmlui-dark.json +631 -0
- package/dist/scripts/src/syntax/textMate/xmlui-light.json +565 -0
- package/dist/scripts/src/syntax/textMate/xmlui.json +564 -0
- package/dist/scripts/src/syntax/textMate/xmlui.tmLanguage.json +341 -0
- package/dist/scripts/src/testing/ComponentDrivers.js +1355 -0
- package/dist/scripts/src/testing/assertions.js +444 -0
- package/dist/scripts/src/testing/component-test-helpers.js +389 -0
- package/dist/scripts/src/testing/drivers/DateInputDriver.js +19 -0
- package/dist/scripts/src/testing/drivers/ModalDialogDriver.js +10 -0
- package/dist/scripts/src/testing/drivers/TimeInputDriver.js +22 -0
- package/dist/scripts/src/testing/drivers/TimerDriver.js +64 -0
- package/dist/scripts/src/testing/fixtures.js +487 -0
- package/dist/scripts/src/testing/infrastructure/TestBed.js +17 -0
- package/dist/scripts/src/testing/infrastructure/main.js +9 -0
- package/dist/scripts/src/testing/infrastructure/public/mockServiceWorker.js +266 -0
- package/dist/scripts/src/testing/themed-app-test-helpers.js +139 -0
- package/dist/standalone/xmlui-standalone.es.d.ts +19 -2
- package/dist/standalone/xmlui-standalone.umd.js +36 -36
- package/package.json +1 -1
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +0 -28
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const component_test_helpers_1 = require("../../testing/component-test-helpers");
|
|
13
|
+
const fixtures_1 = require("../../testing/fixtures");
|
|
14
|
+
// =============================================================================
|
|
15
|
+
// BASIC FUNCTIONALITY TESTS
|
|
16
|
+
// =============================================================================
|
|
17
|
+
fixtures_1.test.describe("Basic Functionality", () => {
|
|
18
|
+
(0, fixtures_1.test)("component renders", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
19
|
+
yield initTestBed(`<TextBox />`);
|
|
20
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeVisible();
|
|
21
|
+
}));
|
|
22
|
+
(0, fixtures_1.test)("component renders with label", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
23
|
+
yield initTestBed(`<TextBox label="Username" />`);
|
|
24
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeVisible();
|
|
25
|
+
yield (0, fixtures_1.expect)(page.getByText("Username")).toBeVisible();
|
|
26
|
+
}));
|
|
27
|
+
(0, fixtures_1.test)("initialValue sets field value", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
28
|
+
yield initTestBed(`<TextBox initialValue="test value" />`);
|
|
29
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("test value");
|
|
30
|
+
}));
|
|
31
|
+
(0, fixtures_1.test)("initialValue accepts empty as empty string", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
32
|
+
yield initTestBed(`<TextBox initialValue="" />`);
|
|
33
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("");
|
|
34
|
+
}));
|
|
35
|
+
(0, fixtures_1.test)("initialValue accepts different data types", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
36
|
+
// Test string
|
|
37
|
+
yield initTestBed(`<TextBox initialValue="hello" />`);
|
|
38
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("hello");
|
|
39
|
+
// Test number
|
|
40
|
+
yield initTestBed(`<TextBox initialValue="{123}" />`);
|
|
41
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("123");
|
|
42
|
+
// Test boolean
|
|
43
|
+
yield initTestBed(`<TextBox initialValue="{true}" />`);
|
|
44
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("true");
|
|
45
|
+
}));
|
|
46
|
+
(0, fixtures_1.test)("initialValue handles null", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
47
|
+
yield initTestBed(`<TextBox initialValue="{null}" />`);
|
|
48
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("");
|
|
49
|
+
}));
|
|
50
|
+
(0, fixtures_1.test)("initialValue handles undefined", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
51
|
+
yield initTestBed(`<TextBox initialValue="{undefined}" />`);
|
|
52
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("");
|
|
53
|
+
}));
|
|
54
|
+
(0, fixtures_1.test)("component accepts user input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
55
|
+
yield initTestBed(`<TextBox />`);
|
|
56
|
+
yield page.getByRole("textbox").fill("user input");
|
|
57
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("user input");
|
|
58
|
+
}));
|
|
59
|
+
(0, fixtures_1.test)("component clears input correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
60
|
+
yield initTestBed(`<TextBox initialValue="initial text" />`);
|
|
61
|
+
const textbox = page.getByRole("textbox");
|
|
62
|
+
yield (0, fixtures_1.expect)(textbox).toHaveValue("initial text");
|
|
63
|
+
yield textbox.clear();
|
|
64
|
+
yield (0, fixtures_1.expect)(textbox).toHaveValue("");
|
|
65
|
+
}));
|
|
66
|
+
(0, fixtures_1.test)("component required prop adds required attribute", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
67
|
+
yield initTestBed(`<TextBox required="true" />`);
|
|
68
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("required");
|
|
69
|
+
}));
|
|
70
|
+
(0, fixtures_1.test)("enabled=false disables control", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
71
|
+
yield initTestBed(`<TextBox enabled="false" />`);
|
|
72
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeDisabled();
|
|
73
|
+
}));
|
|
74
|
+
(0, fixtures_1.test)("enabled=false prevents user input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
75
|
+
yield initTestBed(`<TextBox enabled="false" />`);
|
|
76
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).not.toBeEditable();
|
|
77
|
+
}));
|
|
78
|
+
(0, fixtures_1.test)("readOnly prevents editing but allows focus", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
79
|
+
yield initTestBed(`<TextBox readOnly="true" initialValue="read only text" />`);
|
|
80
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("readonly");
|
|
81
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("read only text");
|
|
82
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).not.toBeEditable();
|
|
83
|
+
yield page.getByRole("textbox").focus();
|
|
84
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeFocused();
|
|
85
|
+
}));
|
|
86
|
+
(0, fixtures_1.test)("autoFocus focuses input on mount", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
87
|
+
yield initTestBed(`<TextBox autoFocus="true" />`);
|
|
88
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeFocused();
|
|
89
|
+
}));
|
|
90
|
+
(0, fixtures_1.test)("autoFocus focuses input on mount with label", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
91
|
+
yield initTestBed(`<TextBox autoFocus="true" label="Auto-focused input" />`);
|
|
92
|
+
yield (0, fixtures_1.expect)(page.getByLabel("Auto-focused input")).toBeFocused();
|
|
93
|
+
}));
|
|
94
|
+
(0, fixtures_1.test)("placeholder shows when input is empty", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
95
|
+
yield initTestBed(`<TextBox placeholder="Enter text here..." />`);
|
|
96
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("placeholder", "Enter text here...");
|
|
97
|
+
}));
|
|
98
|
+
(0, fixtures_1.test)("maxLength limits input length", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
99
|
+
yield initTestBed(`<TextBox maxLength="5" />`);
|
|
100
|
+
yield page.getByRole("textbox").fill("12345678");
|
|
101
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("12345");
|
|
102
|
+
}));
|
|
103
|
+
(0, fixtures_1.test)("can render startIcon", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
104
|
+
yield initTestBed(`<TextBox startIcon="search" />`);
|
|
105
|
+
yield (0, fixtures_1.expect)(page.getByRole("img")).toBeVisible();
|
|
106
|
+
}));
|
|
107
|
+
(0, fixtures_1.test)("can render endIcon", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
108
|
+
yield initTestBed(`<TextBox endIcon="search" />`);
|
|
109
|
+
yield (0, fixtures_1.expect)(page.getByRole("img")).toBeVisible();
|
|
110
|
+
}));
|
|
111
|
+
});
|
|
112
|
+
// =============================================================================
|
|
113
|
+
// ACCESSIBILITY TESTS
|
|
114
|
+
// =============================================================================
|
|
115
|
+
fixtures_1.test.describe("Accessibility", () => {
|
|
116
|
+
(0, fixtures_1.test)("label is properly associated with input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
117
|
+
yield initTestBed(`<TextBox label="Username" />`);
|
|
118
|
+
yield (0, fixtures_1.expect)(page.getByLabel("Username")).toBeVisible();
|
|
119
|
+
}));
|
|
120
|
+
(0, fixtures_1.test)("component supports keyboard navigation", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
121
|
+
yield initTestBed(`<TextBox label="Input" />`);
|
|
122
|
+
yield page.keyboard.press("Tab", { delay: 100 });
|
|
123
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeFocused();
|
|
124
|
+
}));
|
|
125
|
+
(0, fixtures_1.test)("component supports keyboard navigation from other elements", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page, }) {
|
|
126
|
+
yield initTestBed(`
|
|
127
|
+
<Fragment>
|
|
128
|
+
<TextBox testId="first-input" label="First input" />
|
|
129
|
+
<TextBox testId="second-input" label="Second input" />
|
|
130
|
+
</Fragment>
|
|
131
|
+
`);
|
|
132
|
+
const firstInput = page.getByTestId("first-input").getByRole("textbox");
|
|
133
|
+
const secondInput = page.getByTestId("second-input").getByRole("textbox");
|
|
134
|
+
yield firstInput.focus();
|
|
135
|
+
yield (0, fixtures_1.expect)(firstInput).toBeFocused();
|
|
136
|
+
yield page.keyboard.press("Tab", { delay: 100 });
|
|
137
|
+
yield (0, fixtures_1.expect)(secondInput).toBeFocused();
|
|
138
|
+
}));
|
|
139
|
+
(0, fixtures_1.test)("required has proper ARIA attributes", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
140
|
+
yield initTestBed(`<TextBox required="true" label="Required input" />`);
|
|
141
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("required");
|
|
142
|
+
yield (0, fixtures_1.expect)(page.getByText("Required input")).toContainText("*");
|
|
143
|
+
}));
|
|
144
|
+
(0, fixtures_1.test)("disabled component has proper attribute", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
145
|
+
yield initTestBed(`<TextBox enabled="false" />`);
|
|
146
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("disabled");
|
|
147
|
+
}));
|
|
148
|
+
(0, fixtures_1.test)("readOnly has proper ARIA attributes", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
149
|
+
yield initTestBed(`<TextBox readOnly="true" label="Read-only input" />`);
|
|
150
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("readonly");
|
|
151
|
+
}));
|
|
152
|
+
});
|
|
153
|
+
// =============================================================================
|
|
154
|
+
// LABEL POSITIONING TESTS
|
|
155
|
+
// =============================================================================
|
|
156
|
+
fixtures_1.test.describe("Label", () => {
|
|
157
|
+
(0, fixtures_1.test)("labelPosition=start positions label before input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
158
|
+
yield initTestBed(`<TextBox direction="ltr" label="test" labelPosition="start" />`);
|
|
159
|
+
const { left: textboxLeft } = yield (0, component_test_helpers_1.getBounds)(page.getByLabel("test"));
|
|
160
|
+
const { right: labelRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("test"));
|
|
161
|
+
(0, fixtures_1.expect)(labelRight).toBeLessThan(textboxLeft);
|
|
162
|
+
}));
|
|
163
|
+
(0, fixtures_1.test)("labelPosition=end positions label after input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
164
|
+
yield initTestBed(`<TextBox direction="ltr" label="test" labelPosition="end" />`);
|
|
165
|
+
const { right: textboxRight } = yield (0, component_test_helpers_1.getBounds)(page.getByLabel("test"));
|
|
166
|
+
const { left: labelLeft } = yield (0, component_test_helpers_1.getBounds)(page.getByText("test"));
|
|
167
|
+
(0, fixtures_1.expect)(labelLeft).toBeGreaterThan(textboxRight);
|
|
168
|
+
}));
|
|
169
|
+
(0, fixtures_1.test)("labelPosition=top positions label above input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
170
|
+
yield initTestBed(`<TextBox label="test" labelPosition="top" />`);
|
|
171
|
+
const { top: textboxTop } = yield (0, component_test_helpers_1.getBounds)(page.getByLabel("test"));
|
|
172
|
+
const { bottom: labelBottom } = yield (0, component_test_helpers_1.getBounds)(page.getByText("test"));
|
|
173
|
+
(0, fixtures_1.expect)(labelBottom).toBeLessThan(textboxTop);
|
|
174
|
+
}));
|
|
175
|
+
(0, fixtures_1.test)("labelPosition=bottom positions label below input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
176
|
+
yield initTestBed(`<TextBox label="test" labelPosition="bottom" />`);
|
|
177
|
+
const { bottom: textboxBottom } = yield (0, component_test_helpers_1.getBounds)(page.getByLabel("test"));
|
|
178
|
+
const { top: labelTop } = yield (0, component_test_helpers_1.getBounds)(page.getByText("test"));
|
|
179
|
+
(0, fixtures_1.expect)(labelTop).toBeGreaterThan(textboxBottom);
|
|
180
|
+
}));
|
|
181
|
+
(0, fixtures_1.test)("labelWidth applies custom label width", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
182
|
+
const expected = 200;
|
|
183
|
+
yield initTestBed(`<TextBox label="test test" labelWidth="${expected}px" />`);
|
|
184
|
+
const { width } = yield (0, component_test_helpers_1.getBounds)(page.getByText("test test"));
|
|
185
|
+
(0, fixtures_1.expect)(width).toEqual(expected);
|
|
186
|
+
}));
|
|
187
|
+
(0, fixtures_1.test)("labelBreak enables label line breaks", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
188
|
+
const labelText = "Very long label text that should break";
|
|
189
|
+
const commonProps = `label="${labelText}" labelWidth="100px"`;
|
|
190
|
+
yield initTestBed(`<Fragment>
|
|
191
|
+
<TextBox ${commonProps} testId="break" labelBreak="{true}" />
|
|
192
|
+
<TextBox ${commonProps} testId="oneLine" labelBreak="{false}" />
|
|
193
|
+
</Fragment>`);
|
|
194
|
+
const labelBreak = page.getByTestId("break").getByText(labelText);
|
|
195
|
+
const labelOneLine = page.getByTestId("oneLine").getByText(labelText);
|
|
196
|
+
const { height: heightBreak } = yield (0, component_test_helpers_1.getBounds)(labelBreak);
|
|
197
|
+
const { height: heightOneLine } = yield (0, component_test_helpers_1.getBounds)(labelOneLine);
|
|
198
|
+
(0, fixtures_1.expect)(heightBreak).toBeGreaterThan(heightOneLine);
|
|
199
|
+
}));
|
|
200
|
+
(0, fixtures_1.test)("component handles invalid labelPosition gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
201
|
+
yield initTestBed(`<TextBox labelPosition="invalid" label="test" />`);
|
|
202
|
+
yield (0, fixtures_1.expect)(page.getByLabel("test")).toBeVisible();
|
|
203
|
+
yield (0, fixtures_1.expect)(page.getByText("test")).toBeVisible();
|
|
204
|
+
}));
|
|
205
|
+
});
|
|
206
|
+
// =============================================================================
|
|
207
|
+
// EVENT HANDLING TESTS
|
|
208
|
+
// =============================================================================
|
|
209
|
+
fixtures_1.test.describe("Event Handling", () => {
|
|
210
|
+
(0, fixtures_1.test)("didChange event fires on input change", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
211
|
+
const { testStateDriver } = yield initTestBed(`
|
|
212
|
+
<TextBox onDidChange="testState = 'changed'" />
|
|
213
|
+
`);
|
|
214
|
+
yield page.getByRole("textbox").fill("test");
|
|
215
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("changed");
|
|
216
|
+
}));
|
|
217
|
+
(0, fixtures_1.test)("didChange event passes new value", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
218
|
+
const { testStateDriver } = yield initTestBed(`
|
|
219
|
+
<TextBox onDidChange="arg => testState = arg" />
|
|
220
|
+
`);
|
|
221
|
+
yield page.getByRole("textbox").fill("test value");
|
|
222
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("test value");
|
|
223
|
+
}));
|
|
224
|
+
(0, fixtures_1.test)("gotFocus event fires on focus", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
225
|
+
const { testStateDriver } = yield initTestBed(`
|
|
226
|
+
<TextBox onGotFocus="testState = 'focused'" />
|
|
227
|
+
`);
|
|
228
|
+
yield page.getByRole("textbox").focus();
|
|
229
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("focused");
|
|
230
|
+
}));
|
|
231
|
+
(0, fixtures_1.test)("component lostFocus event fires on blur", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
232
|
+
const { testStateDriver } = yield initTestBed(`
|
|
233
|
+
<TextBox onLostFocus="testState = 'blurred'" />
|
|
234
|
+
`);
|
|
235
|
+
yield page.getByRole("textbox").focus();
|
|
236
|
+
yield page.getByRole("textbox").blur();
|
|
237
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("blurred");
|
|
238
|
+
}));
|
|
239
|
+
(0, fixtures_1.test)("events do not fire when component is disabled", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
240
|
+
const { testStateDriver } = yield initTestBed(`
|
|
241
|
+
<TextBox enabled="false" didChange="testState = 'changed'" gotFocus="testState = 'focused'" />
|
|
242
|
+
`);
|
|
243
|
+
yield page.getByRole("textbox").focus();
|
|
244
|
+
yield page.getByRole("textbox").fill("test", { force: true });
|
|
245
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual(null);
|
|
246
|
+
}));
|
|
247
|
+
});
|
|
248
|
+
// =============================================================================
|
|
249
|
+
// API TESTS
|
|
250
|
+
// =============================================================================
|
|
251
|
+
fixtures_1.test.describe("Api", () => {
|
|
252
|
+
(0, fixtures_1.test)("component value API returns current state", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
253
|
+
yield initTestBed(`
|
|
254
|
+
<Fragment>
|
|
255
|
+
<TextBox id="myTextBox" initialValue="initial" />
|
|
256
|
+
<Text testId="value">{myTextBox.value}</Text>
|
|
257
|
+
</Fragment>
|
|
258
|
+
`);
|
|
259
|
+
yield (0, fixtures_1.expect)(page.getByTestId("value")).toHaveText("initial");
|
|
260
|
+
}));
|
|
261
|
+
(0, fixtures_1.test)("component value API returns state after change", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
262
|
+
yield initTestBed(`
|
|
263
|
+
<Fragment>
|
|
264
|
+
<TextBox id="myTextBox" />
|
|
265
|
+
<Text testId="value">{myTextBox.value}</Text>
|
|
266
|
+
</Fragment>
|
|
267
|
+
`);
|
|
268
|
+
yield (0, fixtures_1.expect)(page.getByTestId("value")).toHaveText("");
|
|
269
|
+
yield page.getByRole("textbox").fill("new value");
|
|
270
|
+
yield (0, fixtures_1.expect)(page.getByTestId("value")).toHaveText("new value");
|
|
271
|
+
}));
|
|
272
|
+
(0, fixtures_1.test)("component setValue API updates state", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
273
|
+
yield initTestBed(`
|
|
274
|
+
<Fragment>
|
|
275
|
+
<TextBox id="myTextBox" />
|
|
276
|
+
<Button testId="setBtn" onClick="myTextBox.setValue('api value')" />
|
|
277
|
+
</Fragment>
|
|
278
|
+
`);
|
|
279
|
+
yield page.getByTestId("setBtn").click();
|
|
280
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("api value");
|
|
281
|
+
}));
|
|
282
|
+
(0, fixtures_1.test)("component setValue API triggers events", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
283
|
+
const { testStateDriver } = yield initTestBed(`
|
|
284
|
+
<Fragment>
|
|
285
|
+
<TextBox id="myTextBox" onDidChange="testState = 'api-changed'" />
|
|
286
|
+
<Button testId="setBtn" onClick="myTextBox.setValue('test')">Set Value</Button>
|
|
287
|
+
</Fragment>
|
|
288
|
+
`);
|
|
289
|
+
yield page.getByTestId("setBtn").click();
|
|
290
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("api-changed");
|
|
291
|
+
}));
|
|
292
|
+
(0, fixtures_1.test)("focus API focuses the input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
293
|
+
yield initTestBed(`
|
|
294
|
+
<Fragment>
|
|
295
|
+
<TextBox id="myTextBox" />
|
|
296
|
+
<Button testId="focusBtn" onClick="myTextBox.focus()">Focus</Button>
|
|
297
|
+
</Fragment>
|
|
298
|
+
`);
|
|
299
|
+
const textbox = page.getByRole("textbox");
|
|
300
|
+
yield (0, fixtures_1.expect)(textbox).not.toBeFocused();
|
|
301
|
+
yield page.getByTestId("focusBtn").click();
|
|
302
|
+
yield (0, fixtures_1.expect)(textbox).toBeFocused();
|
|
303
|
+
}));
|
|
304
|
+
(0, fixtures_1.test)("focus API does nothing when component is disabled", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
305
|
+
yield initTestBed(`
|
|
306
|
+
<Fragment>
|
|
307
|
+
<TextBox id="myTextBox" enabled="false" />
|
|
308
|
+
<Button testId="focusBtn" onClick="myTextBox.focus()">Focus</Button>
|
|
309
|
+
</Fragment>
|
|
310
|
+
`);
|
|
311
|
+
yield page.getByTestId("focusBtn").click();
|
|
312
|
+
const textbox = page.getByRole("textbox");
|
|
313
|
+
yield (0, fixtures_1.expect)(textbox).not.toBeFocused();
|
|
314
|
+
}));
|
|
315
|
+
});
|
|
316
|
+
// =============================================================================
|
|
317
|
+
// INPUT ADORNMENTS TESTS
|
|
318
|
+
// =============================================================================
|
|
319
|
+
fixtures_1.test.describe("Input Adornments", () => {
|
|
320
|
+
(0, fixtures_1.test)("startText displays at beginning of input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
321
|
+
yield initTestBed(`<TextBox testId="input" direction="ltr" startText="$" />`);
|
|
322
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
323
|
+
const { left: textLeft, right: textRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("$"));
|
|
324
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toContainText("$");
|
|
325
|
+
(0, fixtures_1.expect)(textRight - compLeft).toBeLessThanOrEqual(compRight - textLeft);
|
|
326
|
+
}));
|
|
327
|
+
(0, fixtures_1.test)("startText displays at beginning of input (rtl)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
328
|
+
yield initTestBed(`<TextBox testId="input" direction="rtl" startText="$" />`);
|
|
329
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
330
|
+
const { left: textLeft, right: textRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("$"));
|
|
331
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toContainText("$");
|
|
332
|
+
(0, fixtures_1.expect)(textRight - compLeft).toBeGreaterThanOrEqual(compRight - textLeft);
|
|
333
|
+
}));
|
|
334
|
+
(0, fixtures_1.test)("endText displays at end of input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
335
|
+
yield initTestBed(`<TextBox testId="input" direction="ltr" endText="USD" />`);
|
|
336
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
337
|
+
const { left: textLeft, right: textRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("USD"));
|
|
338
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toContainText("USD");
|
|
339
|
+
(0, fixtures_1.expect)(textRight - compLeft).toBeGreaterThanOrEqual(compRight - textLeft);
|
|
340
|
+
}));
|
|
341
|
+
(0, fixtures_1.test)("endText displays at end of input (rtl)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
342
|
+
yield initTestBed(`<TextBox testId="input" direction="rtl" endText="USD" />`);
|
|
343
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
344
|
+
const { left: textLeft, right: textRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("USD"));
|
|
345
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toContainText("USD");
|
|
346
|
+
(0, fixtures_1.expect)(textRight - compLeft).toBeLessThanOrEqual(compRight - textLeft);
|
|
347
|
+
}));
|
|
348
|
+
(0, fixtures_1.test)("startIcon displays at beginning of input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
349
|
+
yield initTestBed(`<TextBox testId="input" direction="ltr" startIcon="search" />`);
|
|
350
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
351
|
+
const { left: iconLeft, right: iconRight } = yield (0, component_test_helpers_1.getBounds)(page.getByRole("img"));
|
|
352
|
+
(0, fixtures_1.expect)(iconRight - compLeft).toBeLessThanOrEqual(compRight - iconLeft);
|
|
353
|
+
}));
|
|
354
|
+
(0, fixtures_1.test)("startIcon displays at beginning of input (rtl)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
355
|
+
yield initTestBed(`<TextBox testId="input" direction="rtl" startIcon="search" />`);
|
|
356
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
357
|
+
const { left: iconLeft, right: iconRight } = yield (0, component_test_helpers_1.getBounds)(page.getByRole("img"));
|
|
358
|
+
(0, fixtures_1.expect)(iconRight - compLeft).toBeGreaterThanOrEqual(compRight - iconLeft);
|
|
359
|
+
}));
|
|
360
|
+
(0, fixtures_1.test)("endIcon displays at end of input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
361
|
+
yield initTestBed(`<TextBox testId="input" endIcon="search" />`);
|
|
362
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
363
|
+
const { left: iconLeft, right: iconRight } = yield (0, component_test_helpers_1.getBounds)(page.getByRole("img"));
|
|
364
|
+
(0, fixtures_1.expect)(iconRight - compLeft).toBeGreaterThanOrEqual(compRight - iconLeft);
|
|
365
|
+
}));
|
|
366
|
+
(0, fixtures_1.test)("endIcon displays at end of input (rtl)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
367
|
+
yield initTestBed(`<TextBox testId="input" direction="rtl" endIcon="search" />`);
|
|
368
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
369
|
+
const { left: iconLeft, right: iconRight } = yield (0, component_test_helpers_1.getBounds)(page.getByRole("img"));
|
|
370
|
+
(0, fixtures_1.expect)(iconRight - compLeft).toBeLessThanOrEqual(compRight - iconLeft);
|
|
371
|
+
}));
|
|
372
|
+
(0, fixtures_1.test)("multiple adornments can be combined", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
373
|
+
yield initTestBed(`
|
|
374
|
+
<TextBox testId="input" startText="$" endText="USD" startIcon="search" endIcon="search" />`);
|
|
375
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toContainText("$");
|
|
376
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toContainText("USD");
|
|
377
|
+
yield (0, fixtures_1.expect)(page.getByRole("img").first()).toBeVisible();
|
|
378
|
+
yield (0, fixtures_1.expect)(page.getByRole("img").last()).toBeVisible();
|
|
379
|
+
}));
|
|
380
|
+
(0, fixtures_1.test)("all adornments appear in the right place", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
381
|
+
yield initTestBed(`
|
|
382
|
+
<TextBox testId="input" startText="$" endText="USD" startIcon="search" endIcon="search" direction="ltr" />
|
|
383
|
+
`);
|
|
384
|
+
const { left: compLeft, right: compRight } = yield (0, component_test_helpers_1.getBounds)(page.getByTestId("input"));
|
|
385
|
+
const { left: startTextLeft, right: startTextRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("$"));
|
|
386
|
+
const { left: endTextLeft, right: endTextRight } = yield (0, component_test_helpers_1.getBounds)(page.getByText("USD"));
|
|
387
|
+
const { left: startIconLeft, right: startIconRight } = yield (0, component_test_helpers_1.getBounds)(page.getByRole("img").first());
|
|
388
|
+
const { left: endIconLeft, right: endIconRight } = yield (0, component_test_helpers_1.getBounds)(page.getByRole("img").last());
|
|
389
|
+
// Check order of adornments
|
|
390
|
+
(0, fixtures_1.expect)(startTextRight - compLeft).toBeLessThanOrEqual(compRight - startTextLeft);
|
|
391
|
+
(0, fixtures_1.expect)(startIconRight - compLeft).toBeLessThanOrEqual(compRight - startIconLeft);
|
|
392
|
+
(0, fixtures_1.expect)(endTextRight - compLeft).toBeGreaterThanOrEqual(compRight - endTextLeft);
|
|
393
|
+
(0, fixtures_1.expect)(endIconRight - compLeft).toBeGreaterThanOrEqual(compRight - endIconLeft);
|
|
394
|
+
}));
|
|
395
|
+
});
|
|
396
|
+
// =============================================================================
|
|
397
|
+
// PASSWORD INPUT TESTS
|
|
398
|
+
// =============================================================================
|
|
399
|
+
fixtures_1.test.describe("Password Input", () => {
|
|
400
|
+
(0, fixtures_1.test)("component renders", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
401
|
+
yield initTestBed(`<PasswordInput />`);
|
|
402
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toBeVisible();
|
|
403
|
+
}));
|
|
404
|
+
(0, fixtures_1.test)("component has password type", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
405
|
+
yield initTestBed(`<PasswordInput />`);
|
|
406
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("type", "password");
|
|
407
|
+
}));
|
|
408
|
+
(0, fixtures_1.test)("component has initial value", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
409
|
+
yield initTestBed(`<PasswordInput initialValue="secret" />`);
|
|
410
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("secret");
|
|
411
|
+
}));
|
|
412
|
+
(0, fixtures_1.test)("showPasswordToggle displays visibility toggle", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
413
|
+
yield initTestBed(`<PasswordInput testId="input" showPasswordToggle="true" />`);
|
|
414
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input").getByRole("button")).toBeVisible();
|
|
415
|
+
}));
|
|
416
|
+
(0, fixtures_1.test)("password toggle switches between visible and hidden", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
417
|
+
yield initTestBed(`<PasswordInput testId="input" showPasswordToggle="true" />`);
|
|
418
|
+
const toggleButton = page.getByTestId("input").getByRole("button");
|
|
419
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("type", "password");
|
|
420
|
+
yield toggleButton.click();
|
|
421
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveAttribute("type", "text");
|
|
422
|
+
}));
|
|
423
|
+
(0, fixtures_1.test)("custom password icons work correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
424
|
+
yield initTestBed(`
|
|
425
|
+
<PasswordInput
|
|
426
|
+
testId="input"
|
|
427
|
+
showPasswordToggle="true"
|
|
428
|
+
passwordVisibleIcon="test"
|
|
429
|
+
passwordHiddenIcon="test"
|
|
430
|
+
/>`, {
|
|
431
|
+
resources: {
|
|
432
|
+
"icon.test": "resources/bell.svg",
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
const icon = page.getByTestId("input").getByRole("img");
|
|
436
|
+
yield (0, fixtures_1.expect)(icon).toBeVisible();
|
|
437
|
+
yield page.getByTestId("input").getByRole("button").click();
|
|
438
|
+
yield (0, fixtures_1.expect)(icon).toBeVisible();
|
|
439
|
+
}));
|
|
440
|
+
});
|
|
441
|
+
// =============================================================================
|
|
442
|
+
// VISUAL STATE TESTS
|
|
443
|
+
// =============================================================================
|
|
444
|
+
fixtures_1.test.describe("Theme Vars", () => {
|
|
445
|
+
(0, fixtures_1.test)("backgroundColor applies correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
446
|
+
yield initTestBed(`<TextBox testId="input" />`, {
|
|
447
|
+
testThemeVars: {
|
|
448
|
+
"backgroundColor-TextBox": "rgb(255, 240, 240)",
|
|
449
|
+
},
|
|
450
|
+
});
|
|
451
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("background-color", "rgb(255, 240, 240)");
|
|
452
|
+
}));
|
|
453
|
+
(0, fixtures_1.test)("borderColor applies correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
454
|
+
yield initTestBed(`<TextBox testId="input" />`, {
|
|
455
|
+
testThemeVars: {
|
|
456
|
+
"borderColor-TextBox": "rgb(255, 0, 0)",
|
|
457
|
+
},
|
|
458
|
+
});
|
|
459
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(255, 0, 0)");
|
|
460
|
+
}));
|
|
461
|
+
(0, fixtures_1.test)("textColor applies correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
462
|
+
yield initTestBed(`<TextBox testId="input" />`, {
|
|
463
|
+
testThemeVars: {
|
|
464
|
+
"textColor-TextBox": "rgb(0, 0, 255)",
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("color", "rgb(0, 0, 255)");
|
|
468
|
+
}));
|
|
469
|
+
(0, fixtures_1.test)("focus borderColor applies on focus", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
470
|
+
yield initTestBed(`<TextBox testId="input" />`, {
|
|
471
|
+
testThemeVars: {
|
|
472
|
+
"borderColor-TextBox--focus": "rgb(0, 255, 0)",
|
|
473
|
+
},
|
|
474
|
+
});
|
|
475
|
+
const input = page.getByTestId("input");
|
|
476
|
+
yield input.focus();
|
|
477
|
+
yield (0, fixtures_1.expect)(input).toHaveCSS("border-color", "rgb(0, 255, 0)");
|
|
478
|
+
}));
|
|
479
|
+
(0, fixtures_1.test)("disabled backgroundColor applies when disabled", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
480
|
+
yield initTestBed(`<TextBox testId="input" enabled="false" />`, {
|
|
481
|
+
testThemeVars: {
|
|
482
|
+
"backgroundColor-TextBox--disabled": "rgb(240, 240, 240)",
|
|
483
|
+
},
|
|
484
|
+
});
|
|
485
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("background-color", "rgb(240, 240, 240)");
|
|
486
|
+
}));
|
|
487
|
+
(0, fixtures_1.test)("error borderColor applies with error validation", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
488
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="error" />`, {
|
|
489
|
+
testThemeVars: {
|
|
490
|
+
"borderColor-TextBox-error": "rgb(255, 0, 0)",
|
|
491
|
+
},
|
|
492
|
+
});
|
|
493
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(255, 0, 0)");
|
|
494
|
+
}));
|
|
495
|
+
(0, fixtures_1.test)("warning borderColor applies with warning validation", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
496
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="warning" />`, {
|
|
497
|
+
testThemeVars: {
|
|
498
|
+
"borderColor-TextBox-warning": "rgb(255, 165, 0)",
|
|
499
|
+
},
|
|
500
|
+
});
|
|
501
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(255, 165, 0)");
|
|
502
|
+
}));
|
|
503
|
+
(0, fixtures_1.test)("success borderColor applies with valid validation", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
504
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="valid" />`, {
|
|
505
|
+
testThemeVars: {
|
|
506
|
+
"borderColor-TextBox-success": "rgb(0, 255, 0)",
|
|
507
|
+
},
|
|
508
|
+
});
|
|
509
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(0, 255, 0)");
|
|
510
|
+
}));
|
|
511
|
+
(0, fixtures_1.test)("borderRadius applies correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
512
|
+
yield initTestBed(`<TextBox testId="input" />`, {
|
|
513
|
+
testThemeVars: {
|
|
514
|
+
"borderRadius-TextBox": "8px",
|
|
515
|
+
},
|
|
516
|
+
});
|
|
517
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-radius", "8px");
|
|
518
|
+
}));
|
|
519
|
+
(0, fixtures_1.test)("padding applies correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
520
|
+
yield initTestBed(`<TextBox testId="input" />`, {
|
|
521
|
+
testThemeVars: {
|
|
522
|
+
"padding-TextBox": "12px",
|
|
523
|
+
},
|
|
524
|
+
});
|
|
525
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("padding", "12px");
|
|
526
|
+
}));
|
|
527
|
+
});
|
|
528
|
+
// =============================================================================
|
|
529
|
+
// VALIDATION STATUS TESTS
|
|
530
|
+
// =============================================================================
|
|
531
|
+
fixtures_1.test.describe("Validation", () => {
|
|
532
|
+
(0, fixtures_1.test)("validationStatus=error correctly displayed", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
533
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="error" />`, {
|
|
534
|
+
testThemeVars: {
|
|
535
|
+
"borderColor-TextBox-error": "rgb(255, 0, 0)",
|
|
536
|
+
},
|
|
537
|
+
});
|
|
538
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(255, 0, 0)");
|
|
539
|
+
}));
|
|
540
|
+
(0, fixtures_1.test)("validationStatus=warning correctly displayed", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
541
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="warning" />`, {
|
|
542
|
+
testThemeVars: {
|
|
543
|
+
"borderColor-TextBox-warning": "rgb(255, 165, 0)",
|
|
544
|
+
},
|
|
545
|
+
});
|
|
546
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(255, 165, 0)");
|
|
547
|
+
}));
|
|
548
|
+
(0, fixtures_1.test)("validationStatus=valid correctly displayed", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
549
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="valid" />`, {
|
|
550
|
+
testThemeVars: {
|
|
551
|
+
"borderColor-TextBox-success": "rgb(0, 255, 0)",
|
|
552
|
+
},
|
|
553
|
+
});
|
|
554
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(0, 255, 0)");
|
|
555
|
+
}));
|
|
556
|
+
(0, fixtures_1.test)("handles invalid validationStatus gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
557
|
+
yield initTestBed(`<TextBox testId="input" validationStatus="invalid-status" />`, {
|
|
558
|
+
testThemeVars: {
|
|
559
|
+
"borderColor-TextBox": "rgb(0, 0, 0)",
|
|
560
|
+
"borderColor-TextBox-error": "rgb(255, 0, 0)",
|
|
561
|
+
"borderColor-TextBox-warning": "rgb(255, 165, 0)",
|
|
562
|
+
"borderColor-TextBox-success": "rgb(0, 255, 0)",
|
|
563
|
+
},
|
|
564
|
+
});
|
|
565
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).not.toHaveCSS("border-color", "rgb(255, 0, 0)");
|
|
566
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).not.toHaveCSS("border-color", "rgb(255, 165, 0)");
|
|
567
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).not.toHaveCSS("border-color", "rgb(0, 255, 0)");
|
|
568
|
+
yield (0, fixtures_1.expect)(page.getByTestId("input")).toHaveCSS("border-color", "rgb(0, 0, 0)");
|
|
569
|
+
}));
|
|
570
|
+
});
|
|
571
|
+
// =============================================================================
|
|
572
|
+
// EDGE CASE TESTS
|
|
573
|
+
// =============================================================================
|
|
574
|
+
fixtures_1.test.describe("Edge Cases", () => {
|
|
575
|
+
(0, fixtures_1.test)("handle special characters in input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
576
|
+
yield initTestBed(`<TextBox />`);
|
|
577
|
+
yield page.getByRole("textbox").fill("Hello 日本語 @#$%!");
|
|
578
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("Hello 日本語 @#$%!");
|
|
579
|
+
}));
|
|
580
|
+
(0, fixtures_1.test)("handle Unicode characters in input", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
581
|
+
yield initTestBed(`<TextBox />`);
|
|
582
|
+
yield page.getByRole("textbox").fill("🚀 Unicode test 🎉");
|
|
583
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue("🚀 Unicode test 🎉");
|
|
584
|
+
}));
|
|
585
|
+
(0, fixtures_1.test)("component handles very long input text", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
586
|
+
const longText = "This is a very long text that might cause layout or performance issues in the component".repeat(10);
|
|
587
|
+
yield initTestBed(`<TextBox />`);
|
|
588
|
+
yield page.getByRole("textbox").fill(longText);
|
|
589
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue(longText);
|
|
590
|
+
}));
|
|
591
|
+
(0, fixtures_1.test)("component handles special characters correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
592
|
+
yield initTestBed(`<TextBox label="Input with !@#$%^&*()"/>`, {});
|
|
593
|
+
yield (0, fixtures_1.expect)(page.getByText("Input with !@#$%^&*()")).toBeVisible();
|
|
594
|
+
}));
|
|
595
|
+
(0, fixtures_1.test)("component handles extremely long input values", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
596
|
+
yield initTestBed(`<TextBox />`);
|
|
597
|
+
const veryLongText = "A".repeat(10000);
|
|
598
|
+
yield page.getByRole("textbox").fill(veryLongText);
|
|
599
|
+
yield (0, fixtures_1.expect)(page.getByRole("textbox")).toHaveValue(veryLongText);
|
|
600
|
+
}));
|
|
601
|
+
});
|
|
602
|
+
// =============================================================================
|
|
603
|
+
// INTEGRATION TESTS
|
|
604
|
+
// =============================================================================
|
|
605
|
+
fixtures_1.test.describe("Integration", () => {
|
|
606
|
+
(0, fixtures_1.test)("component works correctly in Stack layout contexts", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
607
|
+
yield initTestBed(`<Stack><TextBox testId="input" /></Stack>`);
|
|
608
|
+
const input = page.getByTestId("input");
|
|
609
|
+
const { width, height } = yield (0, component_test_helpers_1.getBounds)(input);
|
|
610
|
+
yield (0, fixtures_1.expect)(input).toBeVisible();
|
|
611
|
+
(0, fixtures_1.expect)(width).toBeGreaterThan(0);
|
|
612
|
+
(0, fixtures_1.expect)(height).toBeGreaterThan(0);
|
|
613
|
+
}));
|
|
614
|
+
(0, fixtures_1.test)("component works correctly in FlowLayout layout contexts", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
615
|
+
yield initTestBed(`<FlowLayout><TextBox testId="input" /></FlowLayout>`);
|
|
616
|
+
const input = page.getByTestId("input");
|
|
617
|
+
const { width, height } = yield (0, component_test_helpers_1.getBounds)(input);
|
|
618
|
+
yield (0, fixtures_1.expect)(input).toBeVisible();
|
|
619
|
+
(0, fixtures_1.expect)(width).toBeGreaterThan(0);
|
|
620
|
+
(0, fixtures_1.expect)(height).toBeGreaterThan(0);
|
|
621
|
+
}));
|
|
622
|
+
(0, fixtures_1.test)("component integrates with forms correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
623
|
+
yield initTestBed(`<Form><TextBox label="Username" /></Form>`);
|
|
624
|
+
const input = page.getByLabel("Username");
|
|
625
|
+
const { width, height } = yield (0, component_test_helpers_1.getBounds)(input);
|
|
626
|
+
yield (0, fixtures_1.expect)(input).toBeVisible();
|
|
627
|
+
(0, fixtures_1.expect)(width).toBeGreaterThan(0);
|
|
628
|
+
(0, fixtures_1.expect)(height).toBeGreaterThan(0);
|
|
629
|
+
}));
|
|
630
|
+
(0, fixtures_1.test)("component works with conditional rendering", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
631
|
+
yield initTestBed(`
|
|
632
|
+
<Fragment var.showInput="{true}">
|
|
633
|
+
<Fragment when="{showInput}">
|
|
634
|
+
<TextBox label="Conditional input" />
|
|
635
|
+
</Fragment>
|
|
636
|
+
<Button testId="toggleBtn" onClick="showInput = !showInput">Toggle</Button>
|
|
637
|
+
</Fragment>
|
|
638
|
+
`);
|
|
639
|
+
yield (0, fixtures_1.expect)(page.getByLabel("Conditional input")).toBeVisible();
|
|
640
|
+
yield page.getByTestId("toggleBtn").click();
|
|
641
|
+
yield (0, fixtures_1.expect)(page.getByLabel("Conditional input")).not.toBeVisible();
|
|
642
|
+
}));
|
|
643
|
+
});
|