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,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.animationComponentRenderer = exports.AnimationMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
6
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
7
|
+
const AnimationNative_1 = require("./AnimationNative");
|
|
8
|
+
const COMP = "Animation";
|
|
9
|
+
exports.AnimationMd = (0, metadata_helpers_1.createMetadata)({
|
|
10
|
+
status: "experimental",
|
|
11
|
+
description: ``,
|
|
12
|
+
props: {
|
|
13
|
+
animation: {
|
|
14
|
+
description: `The animation object to be applied to the component`,
|
|
15
|
+
},
|
|
16
|
+
animateWhenInView: {
|
|
17
|
+
description: `Indicates whether the animation should start when the component is in view`,
|
|
18
|
+
},
|
|
19
|
+
duration: {
|
|
20
|
+
description: `The duration of the animation in milliseconds`,
|
|
21
|
+
},
|
|
22
|
+
once: {
|
|
23
|
+
description: `Indicates whether the animation should only run once`,
|
|
24
|
+
defaultValue: AnimationNative_1.defaultProps.once,
|
|
25
|
+
},
|
|
26
|
+
reverse: {
|
|
27
|
+
description: `Indicates whether the animation should run in reverse`,
|
|
28
|
+
defaultValue: AnimationNative_1.defaultProps.reverse,
|
|
29
|
+
},
|
|
30
|
+
loop: {
|
|
31
|
+
description: `Indicates whether the animation should loop`,
|
|
32
|
+
defaultValue: AnimationNative_1.defaultProps.loop,
|
|
33
|
+
},
|
|
34
|
+
delay: {
|
|
35
|
+
description: `The delay before the animation starts in milliseconds`,
|
|
36
|
+
defaultValue: AnimationNative_1.defaultProps.delay,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
events: {
|
|
40
|
+
started: { description: `Event fired when the animation starts` },
|
|
41
|
+
stopped: { description: `Event fired when the animation stops` },
|
|
42
|
+
},
|
|
43
|
+
apis: {
|
|
44
|
+
start: { description: `Starts the animation` },
|
|
45
|
+
stop: { description: `Stops the animation` },
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
exports.animationComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.AnimationMd, ({ registerComponentApi, renderChild, node, extractValue, lookupEventHandler }) => {
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(AnimationNative_1.Animation, { registerComponentApi: registerComponentApi, animation: extractValue(node.props.animation), onStop: lookupEventHandler("stopped"), onStart: lookupEventHandler("started"), duration: extractValue.asOptionalNumber(node.props.duration), animateWhenInView: extractValue.asOptionalBoolean(node.props.animateWhenInView), once: extractValue.asOptionalBoolean(node.props.once), reverse: extractValue.asOptionalBoolean(node.props.reverse), loop: extractValue.asOptionalBoolean(node.props.loop), delay: extractValue.asOptionalNumber(node.props.delay), children: renderChild(node.children) }));
|
|
50
|
+
});
|
|
@@ -0,0 +1,219 @@
|
|
|
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 fixtures_1 = require("../../testing/fixtures");
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// BASIC FUNCTIONALITY TESTS
|
|
15
|
+
// =============================================================================
|
|
16
|
+
fixtures_1.test.describe("Basic Functionality", () => {
|
|
17
|
+
(0, fixtures_1.test)("renders with basic props", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
18
|
+
yield initTestBed(`<App name="Test App" testId="app"/>`);
|
|
19
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
20
|
+
}));
|
|
21
|
+
(0, fixtures_1.test)("renders with different layout types", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
22
|
+
yield initTestBed(`<App layout="horizontal" testId="app"/>`);
|
|
23
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
24
|
+
yield initTestBed(`<App layout="horizontal-sticky" testId="app"/>`);
|
|
25
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
26
|
+
yield initTestBed(`<App layout="condensed" testId="app"/>`);
|
|
27
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
28
|
+
yield initTestBed(`<App layout="condensed-sticky" testId="app"/>`);
|
|
29
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
30
|
+
yield initTestBed(`<App layout="vertical" testId="app"/>`);
|
|
31
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
32
|
+
yield initTestBed(`<App layout="vertical-sticky" testId="app"/>`);
|
|
33
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
34
|
+
yield initTestBed(`<App layout="vertical-full-header" testId="app"/>`);
|
|
35
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
36
|
+
}));
|
|
37
|
+
(0, fixtures_1.test)("handles layout prop changes correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed, createButtonDriver, }) {
|
|
38
|
+
yield initTestBed(`
|
|
39
|
+
<App var.lo="vertical" layout="{lo}" testId="app">
|
|
40
|
+
<Button testId="toggleLayout" label="Toggle" onClick="lo = 'horizontal'" />
|
|
41
|
+
</App>
|
|
42
|
+
`);
|
|
43
|
+
const buttonDriver = yield createButtonDriver("toggleLayout");
|
|
44
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toHaveClass(/vertical/);
|
|
45
|
+
buttonDriver.click();
|
|
46
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toHaveClass(/horizontal/);
|
|
47
|
+
}));
|
|
48
|
+
(0, fixtures_1.test)("sets document title from name prop", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
49
|
+
const APP_NAME = "My Test Application";
|
|
50
|
+
yield initTestBed(`<App name="${APP_NAME}" testId="app"/>`);
|
|
51
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
52
|
+
(0, fixtures_1.expect)(yield page.title()).toBe(APP_NAME);
|
|
53
|
+
}));
|
|
54
|
+
(0, fixtures_1.test)("handles different visual states with scrolling options", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
55
|
+
// Test with scrollWholePage=true
|
|
56
|
+
yield initTestBed(`<App scrollWholePage="true" testId="app"/>`);
|
|
57
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toHaveClass(/scrollWholePage/);
|
|
58
|
+
// Test with scrollWholePage=false
|
|
59
|
+
yield initTestBed(`<App scrollWholePage="false" testId="app"/>`);
|
|
60
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).not.toHaveClass(/scrollWholePage/);
|
|
61
|
+
}));
|
|
62
|
+
});
|
|
63
|
+
// =============================================================================
|
|
64
|
+
// EDGE CASE TESTS
|
|
65
|
+
// =============================================================================
|
|
66
|
+
fixtures_1.test.describe("Edge Cases", () => {
|
|
67
|
+
(0, fixtures_1.test)("handles undefined props gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
68
|
+
yield initTestBed(`<App testId="app" />`);
|
|
69
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
70
|
+
// App should use a default layout
|
|
71
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toHaveClass(/horizontal/);
|
|
72
|
+
}));
|
|
73
|
+
(0, fixtures_1.test)("works correctly with basic content structure", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
74
|
+
yield initTestBed(`
|
|
75
|
+
<App testId="app">
|
|
76
|
+
<Text testId="content">Content</Text>
|
|
77
|
+
</App>`);
|
|
78
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
79
|
+
yield (0, fixtures_1.expect)(page.getByTestId("content")).toBeVisible();
|
|
80
|
+
yield (0, fixtures_1.expect)(page.getByText("Content")).toBeVisible();
|
|
81
|
+
}));
|
|
82
|
+
(0, fixtures_1.test)("works correctly with complex content structure", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
83
|
+
yield initTestBed(`
|
|
84
|
+
<App testId="app">
|
|
85
|
+
<AppHeader testId="header">Header Content</AppHeader>
|
|
86
|
+
<NavPanel testId="nav">
|
|
87
|
+
<NavLink testId="link1" to="#">Link 1</NavLink>
|
|
88
|
+
<NavGroup testId="group" label="Group">
|
|
89
|
+
<NavLink testId="nestedLink" to="#">Nested Link</NavLink>
|
|
90
|
+
</NavGroup>
|
|
91
|
+
</NavPanel>
|
|
92
|
+
<Pages fallbackPath="/">
|
|
93
|
+
<Page url="/" testId="homePage">
|
|
94
|
+
<Text testId="homeContent">Home Content</Text>
|
|
95
|
+
</Page>
|
|
96
|
+
</Pages>
|
|
97
|
+
<Footer testId="footer">Footer Content</Footer>
|
|
98
|
+
</App>`);
|
|
99
|
+
yield (0, fixtures_1.expect)(page.getByTestId("app")).toBeVisible();
|
|
100
|
+
// Test component structure
|
|
101
|
+
yield (0, fixtures_1.expect)(page.getByTestId("header")).toBeVisible();
|
|
102
|
+
yield (0, fixtures_1.expect)(page.getByTestId("nav")).toBeVisible();
|
|
103
|
+
yield (0, fixtures_1.expect)(page.getByTestId("footer")).toBeVisible();
|
|
104
|
+
// Test content
|
|
105
|
+
yield (0, fixtures_1.expect)(page.getByText("Header Content")).toBeVisible();
|
|
106
|
+
yield (0, fixtures_1.expect)(page.getByText("Link 1")).toBeVisible();
|
|
107
|
+
yield (0, fixtures_1.expect)(page.getByText("Group")).toBeVisible();
|
|
108
|
+
yield (0, fixtures_1.expect)(page.getByText("Home Content")).toBeVisible();
|
|
109
|
+
yield (0, fixtures_1.expect)(page.getByText("Footer Content")).toBeVisible();
|
|
110
|
+
}));
|
|
111
|
+
});
|
|
112
|
+
// =============================================================================
|
|
113
|
+
// EVENT HANDLING TESTS
|
|
114
|
+
// =============================================================================
|
|
115
|
+
fixtures_1.test.describe("Event Handling", () => {
|
|
116
|
+
(0, fixtures_1.test)("ready event is triggered when App component finishes rendering", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, }) {
|
|
117
|
+
const { testStateDriver } = yield initTestBed(`
|
|
118
|
+
<App
|
|
119
|
+
onReady="() => testState = 'app-ready'"
|
|
120
|
+
testId="app"
|
|
121
|
+
/>
|
|
122
|
+
`);
|
|
123
|
+
// Verify the ready event was fired
|
|
124
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("app-ready");
|
|
125
|
+
}));
|
|
126
|
+
(0, fixtures_1.test)("ready event is triggered for App with complex content", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed }) {
|
|
127
|
+
const { testStateDriver } = yield initTestBed(`
|
|
128
|
+
<App
|
|
129
|
+
onReady="() => testState = 'complex-app-ready'"
|
|
130
|
+
layout="horizontal"
|
|
131
|
+
testId="app"
|
|
132
|
+
>
|
|
133
|
+
<AppHeader>
|
|
134
|
+
<property name="logoTemplate">
|
|
135
|
+
<Text value="Test App" />
|
|
136
|
+
</property>
|
|
137
|
+
</AppHeader>
|
|
138
|
+
<Pages fallbackPath="/">
|
|
139
|
+
<Page url="/">
|
|
140
|
+
<Text value="Home Page" />
|
|
141
|
+
</Page>
|
|
142
|
+
</Pages>
|
|
143
|
+
<Footer>
|
|
144
|
+
<Text value="Footer Content" />
|
|
145
|
+
</Footer>
|
|
146
|
+
</App>
|
|
147
|
+
`);
|
|
148
|
+
// Verify the ready event was fired even with complex content
|
|
149
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("complex-app-ready");
|
|
150
|
+
}));
|
|
151
|
+
(0, fixtures_1.test)("ready event fires only once during component lifecycle", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
152
|
+
const { testStateDriver } = yield initTestBed(`
|
|
153
|
+
<App
|
|
154
|
+
var.counter="{0}"
|
|
155
|
+
onReady="() => { counter = counter + 1; testState = counter; }"
|
|
156
|
+
testId="app"
|
|
157
|
+
>
|
|
158
|
+
<Button
|
|
159
|
+
testId="trigger-rerender"
|
|
160
|
+
label="Re-render"
|
|
161
|
+
onClick="counter = counter"
|
|
162
|
+
/>
|
|
163
|
+
</App>
|
|
164
|
+
`);
|
|
165
|
+
// Initial ready event should fire
|
|
166
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual(1);
|
|
167
|
+
// Trigger a re-render by clicking the button
|
|
168
|
+
yield page.getByTestId("trigger-rerender").click();
|
|
169
|
+
// Counter should still be 1 (ready event doesn't fire again)
|
|
170
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual(1);
|
|
171
|
+
}));
|
|
172
|
+
(0, fixtures_1.test)("messageReceived event is triggered when window receives a message", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page, }) {
|
|
173
|
+
const { testStateDriver } = yield initTestBed(`
|
|
174
|
+
<App
|
|
175
|
+
onMessageReceived="(msg, ev) => testState = msg"
|
|
176
|
+
testId="app"
|
|
177
|
+
/>
|
|
178
|
+
`);
|
|
179
|
+
// Send a message to the window
|
|
180
|
+
yield page.evaluate(() => {
|
|
181
|
+
window.postMessage("test-message", "*");
|
|
182
|
+
});
|
|
183
|
+
// Verify the event was received and handled
|
|
184
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual("test-message");
|
|
185
|
+
}));
|
|
186
|
+
(0, fixtures_1.test)("messageReceived event receives both message data and event object", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page, }) {
|
|
187
|
+
const { testStateDriver } = yield initTestBed(`
|
|
188
|
+
<App
|
|
189
|
+
onMessageReceived="(msg, ev) => testState = { message: msg, eventType: ev.type, origin: ev.origin }"
|
|
190
|
+
testId="app"
|
|
191
|
+
/>
|
|
192
|
+
`);
|
|
193
|
+
// Send a message to the window
|
|
194
|
+
yield page.evaluate(() => {
|
|
195
|
+
window.postMessage("event-test", "*");
|
|
196
|
+
});
|
|
197
|
+
// Verify both parameters are accessible
|
|
198
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toMatchObject({
|
|
199
|
+
message: "event-test",
|
|
200
|
+
eventType: "message",
|
|
201
|
+
origin: fixtures_1.expect.any(String),
|
|
202
|
+
});
|
|
203
|
+
}));
|
|
204
|
+
(0, fixtures_1.test)("messageReceived event handles complex data objects", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
205
|
+
const { testStateDriver } = yield initTestBed(`
|
|
206
|
+
<App
|
|
207
|
+
onMessageReceived="(msg, ev) => testState = msg"
|
|
208
|
+
testId="app"
|
|
209
|
+
/>
|
|
210
|
+
`);
|
|
211
|
+
// Send a complex object as message data
|
|
212
|
+
const testData = { action: "test", payload: { id: 123, name: "test-item" } };
|
|
213
|
+
yield page.evaluate((data) => {
|
|
214
|
+
window.postMessage(data, "*");
|
|
215
|
+
}, testData);
|
|
216
|
+
// Verify the complex data is received correctly
|
|
217
|
+
yield fixtures_1.expect.poll(testStateDriver.testState).toEqual(testData);
|
|
218
|
+
}));
|
|
219
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
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 fixtures_1 = require("../../testing/fixtures");
|
|
13
|
+
const CODE = `
|
|
14
|
+
<AppHeader>
|
|
15
|
+
Hello, World!
|
|
16
|
+
</AppHeader>
|
|
17
|
+
`;
|
|
18
|
+
// =============================================================================
|
|
19
|
+
// BASIC FUNCTIONALITY TESTS
|
|
20
|
+
// =============================================================================
|
|
21
|
+
fixtures_1.test.describe("Basic Functionality", () => {
|
|
22
|
+
(0, fixtures_1.test)("renders with basic props", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver }) {
|
|
23
|
+
yield initTestBed(`<App><AppHeader testId="header" /></App>`);
|
|
24
|
+
const driver = yield createAppHeaderDriver();
|
|
25
|
+
yield (0, fixtures_1.expect)(driver.component).toBeVisible();
|
|
26
|
+
}));
|
|
27
|
+
(0, fixtures_1.test)("renders with title prop", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver }) {
|
|
28
|
+
const TITLE = "Application Title";
|
|
29
|
+
yield initTestBed(`<App><AppHeader testId="header" title="${TITLE}" /></App>`);
|
|
30
|
+
const driver = yield createAppHeaderDriver();
|
|
31
|
+
yield (0, fixtures_1.expect)(driver.component).toBeVisible();
|
|
32
|
+
yield (0, fixtures_1.expect)(driver.component).toContainText(TITLE);
|
|
33
|
+
}));
|
|
34
|
+
(0, fixtures_1.test)("renders with custom logo content", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver, page }) {
|
|
35
|
+
yield initTestBed(`
|
|
36
|
+
<App>
|
|
37
|
+
<AppHeader testId="header">
|
|
38
|
+
<property name="logoTemplate">
|
|
39
|
+
<Icon name="star" testId="customLogo" />
|
|
40
|
+
</property>
|
|
41
|
+
</AppHeader>
|
|
42
|
+
</App>`);
|
|
43
|
+
const driver = yield createAppHeaderDriver();
|
|
44
|
+
yield (0, fixtures_1.expect)(driver.component).toBeVisible();
|
|
45
|
+
yield (0, fixtures_1.expect)(page.getByTestId("customLogo")).toBeVisible();
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
48
|
+
// =============================================================================
|
|
49
|
+
// ACCESSIBILITY TESTS
|
|
50
|
+
// =============================================================================
|
|
51
|
+
fixtures_1.test.describe("Accessibility", () => {
|
|
52
|
+
(0, fixtures_1.test)("has correct accessibility structure", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver, }) {
|
|
53
|
+
// TODO: review these Copilot-created tests
|
|
54
|
+
yield initTestBed(`<App><AppHeader testId="header" title="Accessible Header" /></App>`);
|
|
55
|
+
const driver = yield createAppHeaderDriver("header");
|
|
56
|
+
// AppHeader should have a role of "banner"
|
|
57
|
+
yield (0, fixtures_1.expect)(driver.component).toHaveAttribute("role", "banner");
|
|
58
|
+
}));
|
|
59
|
+
(0, fixtures_1.test)("properly handles focus management", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
60
|
+
yield initTestBed(`
|
|
61
|
+
<App>
|
|
62
|
+
<AppHeader testId="header">
|
|
63
|
+
<NavLink testId="headerLink1" to="#">Link 1</NavLink>
|
|
64
|
+
<NavLink testId="headerLink2" to="#">Link 2</NavLink>
|
|
65
|
+
</AppHeader>
|
|
66
|
+
</App>`);
|
|
67
|
+
// Test that links within the header are keyboard focusable
|
|
68
|
+
yield page.getByTestId("headerLink1").focus();
|
|
69
|
+
yield (0, fixtures_1.expect)(page.getByTestId("headerLink1")).toBeFocused();
|
|
70
|
+
// Test tab navigation works between links
|
|
71
|
+
yield page.keyboard.press("Tab");
|
|
72
|
+
yield (0, fixtures_1.expect)(page.getByTestId("headerLink2")).toBeFocused();
|
|
73
|
+
}));
|
|
74
|
+
});
|
|
75
|
+
// =============================================================================
|
|
76
|
+
// THEME VARIABLE TESTS
|
|
77
|
+
// =============================================================================
|
|
78
|
+
fixtures_1.test.describe("Theme Variables", () => {
|
|
79
|
+
(0, fixtures_1.test)("applies background color theme variable correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver, }) {
|
|
80
|
+
const EXPECTED_BG_COLOR = "rgb(0, 240, 0)";
|
|
81
|
+
yield initTestBed(`<App><AppHeader testId="header" /></App>`, {
|
|
82
|
+
testThemeVars: {
|
|
83
|
+
"backgroundColor-AppHeader": EXPECTED_BG_COLOR,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
const driver = yield createAppHeaderDriver("header");
|
|
87
|
+
yield (0, fixtures_1.expect)(driver.component).toHaveCSS("background-color", EXPECTED_BG_COLOR);
|
|
88
|
+
}));
|
|
89
|
+
(0, fixtures_1.test)("applies height theme variable correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver, }) {
|
|
90
|
+
const EXPECTED_HEIGHT = "80px";
|
|
91
|
+
yield initTestBed(`<App><AppHeader testId="header" /></App>`, {
|
|
92
|
+
testThemeVars: {
|
|
93
|
+
"height-AppHeader": EXPECTED_HEIGHT,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
const driver = yield createAppHeaderDriver("header");
|
|
97
|
+
yield (0, fixtures_1.expect)(driver.component).toHaveCSS("height", EXPECTED_HEIGHT);
|
|
98
|
+
}));
|
|
99
|
+
(0, fixtures_1.test)("border", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver }) {
|
|
100
|
+
const EXPECTED_COLOR = "rgb(255, 0, 0)";
|
|
101
|
+
const EXPECTED_WIDTH = "5px";
|
|
102
|
+
const EXPECTED_STYLE = "dotted";
|
|
103
|
+
yield initTestBed(CODE, {
|
|
104
|
+
testThemeVars: {
|
|
105
|
+
"border-AppHeader": `${EXPECTED_STYLE} ${EXPECTED_COLOR} ${EXPECTED_WIDTH}`,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
const component = (yield createAppHeaderDriver()).component;
|
|
109
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-top-color", EXPECTED_COLOR);
|
|
110
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-top-width", EXPECTED_WIDTH);
|
|
111
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-top-style", EXPECTED_STYLE);
|
|
112
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-right-color", EXPECTED_COLOR);
|
|
113
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-right-width", EXPECTED_WIDTH);
|
|
114
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-right-style", EXPECTED_STYLE);
|
|
115
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-bottom-color", EXPECTED_COLOR);
|
|
116
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-bottom-width", EXPECTED_WIDTH);
|
|
117
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-bottom-style", EXPECTED_STYLE);
|
|
118
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-left-color", EXPECTED_COLOR);
|
|
119
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-left-width", EXPECTED_WIDTH);
|
|
120
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-left-style", EXPECTED_STYLE);
|
|
121
|
+
}));
|
|
122
|
+
(0, fixtures_1.test)("borderLeft", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver }) {
|
|
123
|
+
const EXPECTED_COLOR = "rgb(255, 0, 0)";
|
|
124
|
+
const EXPECTED_WIDTH = "5px";
|
|
125
|
+
const EXPECTED_STYLE = "dotted";
|
|
126
|
+
yield initTestBed(CODE, {
|
|
127
|
+
testThemeVars: {
|
|
128
|
+
"borderLeft-AppHeader": `${EXPECTED_STYLE} ${EXPECTED_COLOR} ${EXPECTED_WIDTH}`,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
const component = (yield createAppHeaderDriver()).component;
|
|
132
|
+
yield (0, fixtures_1.expect)(component).not.toHaveCSS("border-top-color", EXPECTED_COLOR);
|
|
133
|
+
yield (0, fixtures_1.expect)(component).not.toHaveCSS("border-right-color", EXPECTED_COLOR);
|
|
134
|
+
yield (0, fixtures_1.expect)(component).not.toHaveCSS("border-bottom-color", EXPECTED_COLOR);
|
|
135
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-left-color", EXPECTED_COLOR);
|
|
136
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-left-width", EXPECTED_WIDTH);
|
|
137
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-left-style", EXPECTED_STYLE);
|
|
138
|
+
}));
|
|
139
|
+
});
|
|
140
|
+
// =============================================================================
|
|
141
|
+
// EDGE CASE TESTS
|
|
142
|
+
// =============================================================================
|
|
143
|
+
fixtures_1.test.describe("Edge Cases", () => {
|
|
144
|
+
(0, fixtures_1.test)("handles undefined props gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver }) {
|
|
145
|
+
yield initTestBed(`<App><AppHeader testId="header" title="{undefined}" /></App>`);
|
|
146
|
+
const driver = yield createAppHeaderDriver("header");
|
|
147
|
+
// Component should render without errors when props are undefined
|
|
148
|
+
yield (0, fixtures_1.expect)(driver.component).toBeVisible();
|
|
149
|
+
}));
|
|
150
|
+
(0, fixtures_1.test)("handles special characters in title prop", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver, }) {
|
|
151
|
+
const SPECIAL_TITLE = "应用程序 & Test – Special Character's Test 🚀 ñáéíóú ≤≥∞ «»";
|
|
152
|
+
yield initTestBed(`<App><AppHeader testId="header" title="${SPECIAL_TITLE}" /></App>`);
|
|
153
|
+
const driver = yield createAppHeaderDriver("header");
|
|
154
|
+
// Special characters should display correctly
|
|
155
|
+
yield (0, fixtures_1.expect)(driver.component).toContainText(SPECIAL_TITLE);
|
|
156
|
+
}));
|
|
157
|
+
(0, fixtures_1.test)("handles empty child components", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createAppHeaderDriver }) {
|
|
158
|
+
yield initTestBed(`
|
|
159
|
+
<App>
|
|
160
|
+
<AppHeader testId="header">
|
|
161
|
+
<property name="logoTemplate"></property>
|
|
162
|
+
</AppHeader>
|
|
163
|
+
</App>
|
|
164
|
+
`);
|
|
165
|
+
const driver = yield createAppHeaderDriver("header");
|
|
166
|
+
// Component should handle empty template slots gracefully
|
|
167
|
+
yield (0, fixtures_1.expect)(driver.component).toBeVisible();
|
|
168
|
+
}));
|
|
169
|
+
});
|