xmlui 0.11.3 → 0.11.6
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/bin/index.cjs +8836 -0
- package/dist/bin/index.js +8825 -0
- package/dist/lib/{apiInterceptorWorker-QiltRtq1.js → apiInterceptorWorker-dwrAyq6l.js} +126 -151
- package/dist/lib/{index-DSUDwtWN.js → index-x4orhWfi.js} +2054 -2285
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-DdH1iCH-.js → initMock-DrUirixi.js} +19 -22
- package/dist/lib/language-server-web-worker.js +13 -5
- package/dist/lib/language-server.js +11 -3
- package/dist/lib/{metadata-utils-D27cn-XB.js → metadata-utils-2bsMr4Gd.js} +57 -26
- package/dist/lib/{server-common-hq0poDwA.js → server-common-DI3W4cob.js} +4140 -3741
- package/dist/lib/syntax-textmate.js +8 -2472
- package/dist/lib/testing.d.ts +1 -0
- package/dist/lib/testing.js +20 -23
- package/dist/lib/{transform-Tooy42EB.js → transform-CQ_6R-43.js} +174 -127
- package/dist/lib/vite-xmlui-plugin.d.ts +10 -0
- package/dist/lib/vite-xmlui-plugin.js +8316 -0
- package/dist/lib/{xmlui-parser-BZZ430Wm.js → xmlui-parser-CW8YmGjO.js} +10 -11
- package/dist/lib/xmlui-parser.d.ts +2 -0
- package/dist/lib/xmlui-parser.js +2 -2
- package/dist/lib/{xmlui-serializer-D9D2mQ8m.js → xmlui-serializer-CeCcgdVR.js} +19 -19
- package/dist/lib/xmlui.d.ts +124 -2
- package/dist/lib/xmlui.js +8 -3
- package/dist/metadata/{apiInterceptorWorker-Dql7QGw2.js → apiInterceptorWorker-Wgm2_zjg.js} +124 -149
- package/dist/metadata/{collectedComponentMetadata-C8Lr9TFe.js → collectedComponentMetadata-BGdap_gu.js} +2100 -2276
- package/dist/metadata/{initMock-CWwgOjW_.js → initMock-DlJ0S4Uy.js} +19 -22
- package/dist/metadata/xmlui-metadata.css +1 -0
- package/dist/metadata/xmlui-metadata.js +1 -1
- package/dist/metadata/xmlui-metadata.umd.cjs +3 -3
- package/dist/standalone/xmlui-standalone.es.d.ts +175 -4
- package/dist/standalone/xmlui-standalone.umd.js +36 -37
- package/package.json +20 -50
- package/dist/lib/vite-xmlui-plugin/index.js +0 -13968
- package/dist/lib/vite-xmlui-plugin/package.json +0 -3
- package/dist/metadata/style.css +0 -1
- package/dist/scripts/bin/bootstrap.cjs +0 -4
- package/dist/scripts/bin/build-lib.js +0 -126
- package/dist/scripts/bin/build.js +0 -266
- package/dist/scripts/bin/index.js +0 -167
- package/dist/scripts/bin/preview.js +0 -44
- package/dist/scripts/bin/start.js +0 -52
- package/dist/scripts/bin/vite-xmlui-plugin.js +0 -109
- package/dist/scripts/bin/viteConfig.js +0 -144
- package/dist/scripts/package.json +0 -285
- package/dist/scripts/src/abstractions/ActionDefs.js +0 -2
- package/dist/scripts/src/abstractions/AppContextDefs.js +0 -4
- package/dist/scripts/src/abstractions/ComponentDefs.js +0 -2
- package/dist/scripts/src/abstractions/ContainerDefs.js +0 -2
- package/dist/scripts/src/abstractions/ExtensionDefs.js +0 -2
- package/dist/scripts/src/abstractions/FunctionDefs.js +0 -2
- package/dist/scripts/src/abstractions/RendererDefs.js +0 -2
- package/dist/scripts/src/abstractions/ThemingDefs.js +0 -2
- package/dist/scripts/src/abstractions/scripting/BlockScope.js +0 -2
- package/dist/scripts/src/abstractions/scripting/Compilation.js +0 -2
- package/dist/scripts/src/abstractions/scripting/LogicalThread.js +0 -2
- package/dist/scripts/src/abstractions/scripting/LoopScope.js +0 -2
- package/dist/scripts/src/abstractions/scripting/ScriptParserError.js +0 -2
- package/dist/scripts/src/abstractions/scripting/Token.js +0 -2
- package/dist/scripts/src/abstractions/scripting/TryScope.js +0 -2
- package/dist/scripts/src/abstractions/scripting/TryScopeExp.js +0 -2
- package/dist/scripts/src/abstractions/scripting/modules.js +0 -2
- package/dist/scripts/src/components/APICall/APICall.js +0 -130
- package/dist/scripts/src/components/APICall/APICall.spec.js +0 -910
- package/dist/scripts/src/components/APICall/APICallNative.js +0 -36
- package/dist/scripts/src/components/Accordion/Accordion.js +0 -97
- package/dist/scripts/src/components/Accordion/Accordion.spec.js +0 -969
- package/dist/scripts/src/components/Accordion/AccordionContext.js +0 -20
- package/dist/scripts/src/components/Accordion/AccordionItem.js +0 -35
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +0 -95
- package/dist/scripts/src/components/Accordion/AccordionNative.js +0 -141
- package/dist/scripts/src/components/Animation/AnimationNative.js +0 -263
- package/dist/scripts/src/components/App/App.js +0 -581
- package/dist/scripts/src/components/App/App.spec.js +0 -331
- package/dist/scripts/src/components/App/AppLayoutContext.js +0 -49
- package/dist/scripts/src/components/App/AppNative.js +0 -308
- package/dist/scripts/src/components/App/AppStateContext.js +0 -9
- package/dist/scripts/src/components/App/IndexerContext.js +0 -44
- package/dist/scripts/src/components/App/LinkInfoContext.js +0 -9
- package/dist/scripts/src/components/App/SearchContext.js +0 -35
- package/dist/scripts/src/components/App/Sheet.js +0 -99
- package/dist/scripts/src/components/AppHeader/AppHeader.js +0 -58
- package/dist/scripts/src/components/AppHeader/AppHeader.spec.js +0 -169
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +0 -72
- package/dist/scripts/src/components/AppState/AppState.js +0 -75
- package/dist/scripts/src/components/AppState/AppState.spec.js +0 -292
- package/dist/scripts/src/components/AppState/AppStateNative.js +0 -51
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +0 -109
- package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +0 -433
- package/dist/scripts/src/components/AutoComplete/AutoCompleteContext.js +0 -19
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +0 -498
- package/dist/scripts/src/components/Avatar/Avatar.js +0 -55
- package/dist/scripts/src/components/Avatar/Avatar.spec.js +0 -1514
- package/dist/scripts/src/components/Avatar/AvatarNative.js +0 -58
- package/dist/scripts/src/components/Backdrop/Backdrop.js +0 -40
- package/dist/scripts/src/components/Backdrop/Backdrop.spec.js +0 -131
- package/dist/scripts/src/components/Backdrop/BackdropNative.js +0 -25
- package/dist/scripts/src/components/Badge/Badge.js +0 -81
- package/dist/scripts/src/components/Badge/Badge.spec.js +0 -2214
- package/dist/scripts/src/components/Badge/BadgeNative.js +0 -46
- package/dist/scripts/src/components/Bookmark/Bookmark.js +0 -48
- package/dist/scripts/src/components/Bookmark/Bookmark.spec.js +0 -230
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +0 -55
- package/dist/scripts/src/components/Breakout/Breakout.js +0 -17
- package/dist/scripts/src/components/Breakout/Breakout.spec.js +0 -56
- package/dist/scripts/src/components/Breakout/BreakoutNative.js +0 -24
- package/dist/scripts/src/components/Button/Button-style.spec.js +0 -274
- package/dist/scripts/src/components/Button/Button.js +0 -171
- package/dist/scripts/src/components/Button/Button.spec.js +0 -425
- package/dist/scripts/src/components/Button/ButtonNative.js +0 -109
- package/dist/scripts/src/components/Card/Card.js +0 -89
- package/dist/scripts/src/components/Card/Card.spec.js +0 -150
- package/dist/scripts/src/components/Card/CardNative.js +0 -41
- package/dist/scripts/src/components/Carousel/Carousel.js +0 -133
- package/dist/scripts/src/components/Carousel/Carousel.spec.js +0 -557
- package/dist/scripts/src/components/Carousel/CarouselContext.js +0 -57
- package/dist/scripts/src/components/Carousel/CarouselItem.js +0 -15
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +0 -40
- package/dist/scripts/src/components/Carousel/CarouselNative.js +0 -195
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +0 -34
- package/dist/scripts/src/components/ChangeListener/ChangeListener.spec.js +0 -169
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +0 -30
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.js +0 -92
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.spec.js +0 -999
- package/dist/scripts/src/components/Charts/AreaChart/AreaChartNative.js +0 -127
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +0 -97
- package/dist/scripts/src/components/Charts/BarChart/BarChart.spec.js +0 -597
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +0 -317
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +0 -60
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.spec.js +0 -608
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +0 -41
- package/dist/scripts/src/components/Charts/LabelList/LabelList.spec.js +0 -539
- package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +0 -25
- package/dist/scripts/src/components/Charts/Legend/Legend.js +0 -33
- package/dist/scripts/src/components/Charts/Legend/Legend.spec.js +0 -558
- package/dist/scripts/src/components/Charts/Legend/LegendNative.js +0 -64
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +0 -94
- package/dist/scripts/src/components/Charts/LineChart/LineChart.spec.js +0 -450
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +0 -192
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +0 -64
- package/dist/scripts/src/components/Charts/PieChart/PieChart.spec.js +0 -584
- package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +0 -167
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.js +0 -92
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.spec.js +0 -571
- package/dist/scripts/src/components/Charts/RadarChart/RadarChartNative.js +0 -125
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +0 -27
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.spec.js +0 -451
- package/dist/scripts/src/components/Charts/utils/ChartProvider.js +0 -65
- package/dist/scripts/src/components/Charts/utils/abstractions.js +0 -26
- package/dist/scripts/src/components/Checkbox/Checkbox.js +0 -81
- package/dist/scripts/src/components/Checkbox/Checkbox.spec.js +0 -969
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +0 -42
- package/dist/scripts/src/components/CodeBlock/CodeBlock.spec.js +0 -196
- package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +0 -127
- package/dist/scripts/src/components/CodeBlock/highlight-code.js +0 -273
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +0 -54
- package/dist/scripts/src/components/ColorPicker/ColorPicker.spec.js +0 -312
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +0 -86
- package/dist/scripts/src/components/Column/Column.js +0 -89
- package/dist/scripts/src/components/Column/ColumnNative.js +0 -49
- package/dist/scripts/src/components/Column/TableContext.js +0 -12
- package/dist/scripts/src/components/Column/doc-resources/list-component-data.js +0 -53
- package/dist/scripts/src/components/ComponentProvider.js +0 -811
- package/dist/scripts/src/components/ComponentRegistryContext.js +0 -44
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +0 -51
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +0 -531
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +0 -31
- package/dist/scripts/src/components/DataSource/DataSource.js +0 -124
- package/dist/scripts/src/components/DateInput/DateInput.js +0 -197
- package/dist/scripts/src/components/DateInput/DateInput.spec.js +0 -952
- package/dist/scripts/src/components/DateInput/DateInputNative.js +0 -734
- package/dist/scripts/src/components/DatePicker/DatePicker.js +0 -146
- package/dist/scripts/src/components/DatePicker/DatePicker.spec.js +0 -394
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +0 -326
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +0 -196
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +0 -331
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +0 -146
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +0 -26
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.spec.js +0 -29
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +0 -71
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +0 -101
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.spec.js +0 -435
- package/dist/scripts/src/components/ExpandableItem/ExpandableItemNative.js +0 -109
- package/dist/scripts/src/components/FileInput/FileInput.js +0 -80
- package/dist/scripts/src/components/FileInput/FileInput.spec.js +0 -285
- package/dist/scripts/src/components/FileInput/FileInputNative.js +0 -161
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +0 -58
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.spec.js +0 -296
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +0 -134
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +0 -65
- package/dist/scripts/src/components/FlowLayout/FlowLayout.spec.js +0 -518
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +0 -153
- package/dist/scripts/src/components/Footer/Footer.js +0 -45
- package/dist/scripts/src/components/Footer/Footer.spec.js +0 -991
- package/dist/scripts/src/components/Footer/FooterNative.js +0 -35
- package/dist/scripts/src/components/Form/Form.js +0 -161
- package/dist/scripts/src/components/Form/Form.spec.js +0 -1719
- package/dist/scripts/src/components/Form/FormContext.js +0 -124
- package/dist/scripts/src/components/Form/FormNative.js +0 -463
- package/dist/scripts/src/components/Form/formActions.js +0 -115
- package/dist/scripts/src/components/FormItem/FormItem.js +0 -231
- package/dist/scripts/src/components/FormItem/FormItem.spec.js +0 -1022
- package/dist/scripts/src/components/FormItem/FormItemNative.js +0 -255
- package/dist/scripts/src/components/FormItem/HelperText.js +0 -27
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +0 -52
- package/dist/scripts/src/components/FormItem/Validations.js +0 -389
- package/dist/scripts/src/components/FormSection/FormSection.js +0 -56
- package/dist/scripts/src/components/Fragment/Fragment.js +0 -24
- package/dist/scripts/src/components/Fragment/Fragment.spec.js +0 -50
- package/dist/scripts/src/components/Heading/H1.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H2.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H3.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H4.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H5.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H6.spec.js +0 -66
- package/dist/scripts/src/components/Heading/Heading.js +0 -396
- package/dist/scripts/src/components/Heading/Heading.spec.js +0 -966
- package/dist/scripts/src/components/Heading/HeadingNative.js +0 -98
- package/dist/scripts/src/components/Heading/abstractions.js +0 -4
- package/dist/scripts/src/components/HoverCard/HoverCard.js +0 -18
- package/dist/scripts/src/components/HoverCard/HovercardNative.js +0 -44
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +0 -1441
- package/dist/scripts/src/components/HtmlTags/HtmlTags.spec.js +0 -69
- package/dist/scripts/src/components/IFrame/IFrame.js +0 -77
- package/dist/scripts/src/components/IFrame/IFrame.spec.js +0 -527
- package/dist/scripts/src/components/IFrame/IFrameNative.js +0 -46
- package/dist/scripts/src/components/Icon/AdmonitionDanger.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionInfo.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionNote.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionTip.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionWarning.js +0 -10
- package/dist/scripts/src/components/Icon/ApiIcon.js +0 -10
- package/dist/scripts/src/components/Icon/ArrowDropDown.js +0 -11
- package/dist/scripts/src/components/Icon/ArrowDropUp.js +0 -11
- package/dist/scripts/src/components/Icon/ArrowLeft.js +0 -11
- package/dist/scripts/src/components/Icon/ArrowRight.js +0 -11
- package/dist/scripts/src/components/Icon/Attach.js +0 -10
- package/dist/scripts/src/components/Icon/Binding.js +0 -11
- package/dist/scripts/src/components/Icon/BoardIcon.js +0 -7
- package/dist/scripts/src/components/Icon/BoxIcon.js +0 -10
- package/dist/scripts/src/components/Icon/CheckIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronDownIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronLeft.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronRight.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronUpIcon.js +0 -7
- package/dist/scripts/src/components/Icon/CodeFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/CodeSandbox.js +0 -10
- package/dist/scripts/src/components/Icon/CompactListIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ContentCopyIcon.js +0 -7
- package/dist/scripts/src/components/Icon/DarkToLightIcon.js +0 -10
- package/dist/scripts/src/components/Icon/DatabaseIcon.js +0 -11
- package/dist/scripts/src/components/Icon/DocFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/DocIcon.js +0 -10
- package/dist/scripts/src/components/Icon/DotMenuHorizontalIcon.js +0 -7
- package/dist/scripts/src/components/Icon/DotMenuIcon.js +0 -7
- package/dist/scripts/src/components/Icon/EmailIcon.js +0 -7
- package/dist/scripts/src/components/Icon/EmptyFolderIcon.js +0 -10
- package/dist/scripts/src/components/Icon/ErrorIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ExpressionIcon.js +0 -10
- package/dist/scripts/src/components/Icon/FillPlusCricleIcon.js +0 -7
- package/dist/scripts/src/components/Icon/FilterIcon.js +0 -10
- package/dist/scripts/src/components/Icon/FolderIcon.js +0 -10
- package/dist/scripts/src/components/Icon/GlobeIcon.js +0 -7
- package/dist/scripts/src/components/Icon/HomeIcon.js +0 -7
- package/dist/scripts/src/components/Icon/HyperLinkIcon.js +0 -7
- package/dist/scripts/src/components/Icon/Icon.js +0 -42
- package/dist/scripts/src/components/Icon/Icon.spec.js +0 -527
- package/dist/scripts/src/components/Icon/IconNative.js +0 -127
- package/dist/scripts/src/components/Icon/ImageFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/Inspect.js +0 -10
- package/dist/scripts/src/components/Icon/LightToDark.js +0 -10
- package/dist/scripts/src/components/Icon/LinkIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ListIcon.js +0 -7
- package/dist/scripts/src/components/Icon/LooseListIcon.js +0 -7
- package/dist/scripts/src/components/Icon/MoonIcon.js +0 -10
- package/dist/scripts/src/components/Icon/MoreOptionsIcon.js +0 -7
- package/dist/scripts/src/components/Icon/NoSortIcon.js +0 -8
- package/dist/scripts/src/components/Icon/PDFIcon.js +0 -10
- package/dist/scripts/src/components/Icon/PenIcon.js +0 -7
- package/dist/scripts/src/components/Icon/PhoneIcon.js +0 -7
- package/dist/scripts/src/components/Icon/PhotoIcon.js +0 -10
- package/dist/scripts/src/components/Icon/PlusIcon.js +0 -7
- package/dist/scripts/src/components/Icon/SearchIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ShareIcon.js +0 -10
- package/dist/scripts/src/components/Icon/SortAscendingIcon.js +0 -8
- package/dist/scripts/src/components/Icon/SortDescendingIcon.js +0 -8
- package/dist/scripts/src/components/Icon/StarsIcon.js +0 -10
- package/dist/scripts/src/components/Icon/SunIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TableDeleteColumnIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TableDeleteRowIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TableInsertColumnIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TableInsertRowIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TrashIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TrendingDownIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TrendingLevelIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TrendingUpIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TxtIcon.js +0 -10
- package/dist/scripts/src/components/Icon/UnknownFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/UnlinkIcon.js +0 -10
- package/dist/scripts/src/components/Icon/UserIcon.js +0 -7
- package/dist/scripts/src/components/Icon/WarningIcon.js +0 -7
- package/dist/scripts/src/components/Icon/XlsIcon.js +0 -10
- package/dist/scripts/src/components/IconProvider.js +0 -300
- package/dist/scripts/src/components/IconRegistryContext.js +0 -318
- package/dist/scripts/src/components/Image/Image.js +0 -52
- package/dist/scripts/src/components/Image/Image.spec.js +0 -198
- package/dist/scripts/src/components/Image/ImageNative.js +0 -73
- package/dist/scripts/src/components/Input/InputAdornment.js +0 -28
- package/dist/scripts/src/components/Input/InputDivider.js +0 -35
- package/dist/scripts/src/components/Input/InputLabel.js +0 -25
- package/dist/scripts/src/components/Input/PartialInput.js +0 -155
- package/dist/scripts/src/components/Input/index.js +0 -5
- package/dist/scripts/src/components/InspectButton/InspectButton.js +0 -35
- package/dist/scripts/src/components/Items/Items.js +0 -39
- package/dist/scripts/src/components/Items/Items.spec.js +0 -397
- package/dist/scripts/src/components/Items/ItemsNative.js +0 -33
- package/dist/scripts/src/components/Link/Link.js +0 -82
- package/dist/scripts/src/components/Link/Link.spec.js +0 -894
- package/dist/scripts/src/components/Link/LinkNative.js +0 -48
- package/dist/scripts/src/components/List/List.js +0 -130
- package/dist/scripts/src/components/List/List.spec.js +0 -927
- package/dist/scripts/src/components/List/ListNative.js +0 -433
- package/dist/scripts/src/components/List/doc-resources/list-component-data.js +0 -53
- package/dist/scripts/src/components/Logo/Logo.js +0 -30
- package/dist/scripts/src/components/Logo/LogoNative.js +0 -32
- package/dist/scripts/src/components/Markdown/CodeText.js +0 -38
- package/dist/scripts/src/components/Markdown/Markdown.js +0 -143
- package/dist/scripts/src/components/Markdown/Markdown.spec.js +0 -188
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +0 -476
- package/dist/scripts/src/components/Markdown/parse-binding-expr.js +0 -60
- package/dist/scripts/src/components/Markdown/utils.js +0 -389
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +0 -111
- package/dist/scripts/src/components/ModalDialog/Dialog.js +0 -20
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +0 -83
- package/dist/scripts/src/components/ModalDialog/ModalDialog.spec.js +0 -181
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +0 -217
- package/dist/scripts/src/components/ModalDialog/ModalVisibilityContext.js +0 -60
- package/dist/scripts/src/components/NavGroup/NavGroup.js +0 -70
- package/dist/scripts/src/components/NavGroup/NavGroup.spec.js +0 -304
- package/dist/scripts/src/components/NavGroup/NavGroupContext.js +0 -13
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +0 -133
- package/dist/scripts/src/components/NavLink/NavLink.js +0 -86
- package/dist/scripts/src/components/NavLink/NavLink.spec.js +0 -864
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +0 -73
- package/dist/scripts/src/components/NavPanel/NavPanel.js +0 -53
- package/dist/scripts/src/components/NavPanel/NavPanel.spec.js +0 -864
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +0 -222
- package/dist/scripts/src/components/NestedApp/AppWithCodeView.js +0 -91
- package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +0 -84
- package/dist/scripts/src/components/NestedApp/NestedApp.js +0 -86
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +0 -231
- package/dist/scripts/src/components/NestedApp/Tooltip.js +0 -46
- package/dist/scripts/src/components/NestedApp/defaultProps.js +0 -12
- package/dist/scripts/src/components/NestedApp/utils.js +0 -67
- package/dist/scripts/src/components/NoResult/NoResult.js +0 -46
- package/dist/scripts/src/components/NoResult/NoResult.spec.js +0 -863
- package/dist/scripts/src/components/NoResult/NoResultNative.js +0 -31
- package/dist/scripts/src/components/NumberBox/NumberBox.js +0 -123
- package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +0 -954
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +0 -513
- package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +0 -109
- package/dist/scripts/src/components/Option/Option.js +0 -44
- package/dist/scripts/src/components/Option/Option.spec.js +0 -474
- package/dist/scripts/src/components/Option/OptionNative.js +0 -29
- package/dist/scripts/src/components/Option/OptionTypeProvider.js +0 -16
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +0 -13
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +0 -22
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.spec.js +0 -80
- package/dist/scripts/src/components/Pages/Pages.js +0 -54
- package/dist/scripts/src/components/Pages/PagesNative.js +0 -57
- package/dist/scripts/src/components/Pagination/Pagination.js +0 -107
- package/dist/scripts/src/components/Pagination/Pagination.spec.js +0 -1008
- package/dist/scripts/src/components/Pagination/PaginationNative.js +0 -157
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +0 -24
- package/dist/scripts/src/components/PositionedContainer/PositionedContainerNative.js +0 -14
- package/dist/scripts/src/components/ProfileMenu/ProfileMenu.js +0 -20
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +0 -38
- package/dist/scripts/src/components/ProgressBar/ProgressBar.spec.js +0 -166
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +0 -28
- package/dist/scripts/src/components/Queue/Queue.js +0 -85
- package/dist/scripts/src/components/Queue/Queue.spec.js +0 -624
- package/dist/scripts/src/components/Queue/QueueNative.js +0 -342
- package/dist/scripts/src/components/Queue/queueActions.js +0 -87
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +0 -61
- package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +0 -488
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +0 -158
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +0 -28
- package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +0 -62
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +0 -24
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +0 -135
- package/dist/scripts/src/components/Redirect/Redirect.js +0 -31
- package/dist/scripts/src/components/Redirect/Redirect.spec.js +0 -527
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.js +0 -60
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.spec.js +0 -76
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBarNative.js +0 -313
- package/dist/scripts/src/components/Select/HiddenOption.js +0 -20
- package/dist/scripts/src/components/Select/OptionContext.js +0 -12
- package/dist/scripts/src/components/Select/Select.js +0 -131
- package/dist/scripts/src/components/Select/Select.spec.js +0 -671
- package/dist/scripts/src/components/Select/SelectContext.js +0 -16
- package/dist/scripts/src/components/Select/SelectNative.js +0 -440
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +0 -25
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +0 -103
- package/dist/scripts/src/components/Slider/Slider.js +0 -115
- package/dist/scripts/src/components/Slider/Slider.spec.js +0 -643
- package/dist/scripts/src/components/Slider/SliderNative.js +0 -237
- package/dist/scripts/src/components/Slot/Slot.js +0 -17
- package/dist/scripts/src/components/Slot/Slot.spec.js +0 -368
- package/dist/scripts/src/components/SlotItem.js +0 -32
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +0 -20
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.spec.js +0 -184
- package/dist/scripts/src/components/SpaceFiller/SpaceFillerNative.js +0 -10
- package/dist/scripts/src/components/Spinner/Spinner.js +0 -39
- package/dist/scripts/src/components/Spinner/Spinner.spec.js +0 -161
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +0 -48
- package/dist/scripts/src/components/Splitter/HSplitter.spec.js +0 -104
- package/dist/scripts/src/components/Splitter/Splitter.js +0 -114
- package/dist/scripts/src/components/Splitter/Splitter.spec.js +0 -631
- package/dist/scripts/src/components/Splitter/SplitterNative.js +0 -203
- package/dist/scripts/src/components/Splitter/VSplitter.spec.js +0 -104
- package/dist/scripts/src/components/Splitter/utils.js +0 -22
- package/dist/scripts/src/components/Stack/CHStack.spec.js +0 -86
- package/dist/scripts/src/components/Stack/CVStack.spec.js +0 -86
- package/dist/scripts/src/components/Stack/HStack.spec.js +0 -67
- package/dist/scripts/src/components/Stack/Stack.js +0 -156
- package/dist/scripts/src/components/Stack/Stack.spec.js +0 -654
- package/dist/scripts/src/components/Stack/StackNative.js +0 -45
- package/dist/scripts/src/components/Stack/VStack.spec.js +0 -67
- package/dist/scripts/src/components/StickyBox/StickyBox.js +0 -34
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +0 -42
- package/dist/scripts/src/components/Switch/Switch.js +0 -80
- package/dist/scripts/src/components/Switch/Switch.spec.js +0 -836
- package/dist/scripts/src/components/Table/Table.js +0 -268
- package/dist/scripts/src/components/Table/Table.spec.js +0 -827
- package/dist/scripts/src/components/Table/TableNative.js +0 -670
- package/dist/scripts/src/components/Table/doc-resources/list-component-data.js +0 -53
- package/dist/scripts/src/components/Table/useRowSelection.js +0 -454
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +0 -76
- package/dist/scripts/src/components/TableOfContents/TableOfContents.spec.js +0 -838
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +0 -81
- package/dist/scripts/src/components/Tabs/TabContext.js +0 -58
- package/dist/scripts/src/components/Tabs/TabItem.js +0 -44
- package/dist/scripts/src/components/Tabs/TabItemNative.js +0 -53
- package/dist/scripts/src/components/Tabs/Tabs.js +0 -95
- package/dist/scripts/src/components/Tabs/Tabs.spec.js +0 -1237
- package/dist/scripts/src/components/Tabs/TabsNative.js +0 -137
- package/dist/scripts/src/components/Text/Text.js +0 -181
- package/dist/scripts/src/components/Text/Text.spec.js +0 -1676
- package/dist/scripts/src/components/Text/TextNative.js +0 -244
- package/dist/scripts/src/components/TextArea/TextArea.js +0 -103
- package/dist/scripts/src/components/TextArea/TextArea.spec.js +0 -794
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +0 -196
- package/dist/scripts/src/components/TextArea/TextAreaResizable.js +0 -73
- package/dist/scripts/src/components/TextArea/useComposedRef.js +0 -60
- package/dist/scripts/src/components/TextBox/TextBox.js +0 -131
- package/dist/scripts/src/components/TextBox/TextBox.spec.js +0 -725
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +0 -142
- package/dist/scripts/src/components/Theme/NotificationToast.js +0 -64
- package/dist/scripts/src/components/Theme/Theme.js +0 -47
- package/dist/scripts/src/components/Theme/Theme.spec.js +0 -390
- package/dist/scripts/src/components/Theme/ThemeNative.js +0 -162
- package/dist/scripts/src/components/TimeInput/TimeInput.js +0 -149
- package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +0 -1160
- package/dist/scripts/src/components/TimeInput/TimeInputNative.js +0 -650
- package/dist/scripts/src/components/TimeInput/utils.js +0 -197
- package/dist/scripts/src/components/Timer/Timer.js +0 -62
- package/dist/scripts/src/components/Timer/Timer.spec.js +0 -328
- package/dist/scripts/src/components/Timer/TimerNative.js +0 -178
- package/dist/scripts/src/components/Toggle/Toggle.js +0 -172
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +0 -63
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.spec.js +0 -414
- package/dist/scripts/src/components/ToneSwitch/ToneSwitch.js +0 -51
- package/dist/scripts/src/components/ToneSwitch/ToneSwitch.spec.js +0 -89
- package/dist/scripts/src/components/ToneSwitch/ToneSwitchNative.js +0 -42
- package/dist/scripts/src/components/Tooltip/Tooltip.js +0 -118
- package/dist/scripts/src/components/Tooltip/Tooltip.spec.js +0 -418
- package/dist/scripts/src/components/Tooltip/TooltipNative.js +0 -160
- package/dist/scripts/src/components/Tree/Tree-dynamic.spec.js +0 -2894
- package/dist/scripts/src/components/Tree/Tree-icons.spec.js +0 -206
- package/dist/scripts/src/components/Tree/Tree.spec.js +0 -2839
- package/dist/scripts/src/components/Tree/TreeComponent.js +0 -324
- package/dist/scripts/src/components/Tree/TreeNative.js +0 -1129
- package/dist/scripts/src/components/Tree/testData.js +0 -296
- package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +0 -49
- package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +0 -104
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +0 -64
- package/dist/scripts/src/components/VisuallyHidden.js +0 -21
- package/dist/scripts/src/components/abstractions.js +0 -341
- package/dist/scripts/src/components/chart-color-schemes.js +0 -43
- package/dist/scripts/src/components/collectedComponentMetadata.js +0 -316
- package/dist/scripts/src/components/component-utils.js +0 -29
- package/dist/scripts/src/components/container-helpers.js +0 -26
- package/dist/scripts/src/components/metadata-helpers.js +0 -269
- package/dist/scripts/src/components-core/ApiBoundComponent.js +0 -227
- package/dist/scripts/src/components-core/AppContext.js +0 -16
- package/dist/scripts/src/components-core/ComponentDecorator.js +0 -74
- package/dist/scripts/src/components-core/ComponentViewer.js +0 -69
- package/dist/scripts/src/components-core/CompoundComponent.js +0 -145
- package/dist/scripts/src/components-core/DebugViewProvider.js +0 -43
- package/dist/scripts/src/components-core/EngineError.js +0 -91
- package/dist/scripts/src/components-core/InspectorContext.js +0 -248
- package/dist/scripts/src/components-core/LoaderComponent.js +0 -109
- package/dist/scripts/src/components-core/RestApiProxy.js +0 -468
- package/dist/scripts/src/components-core/StandaloneApp.js +0 -821
- package/dist/scripts/src/components-core/StandaloneExtensionManager.js +0 -44
- package/dist/scripts/src/components-core/TableOfContentsContext.js +0 -168
- package/dist/scripts/src/components-core/abstractions/ComponentRenderer.js +0 -2
- package/dist/scripts/src/components-core/abstractions/LoaderRenderer.js +0 -2
- package/dist/scripts/src/components-core/abstractions/standalone.js +0 -2
- package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +0 -2
- package/dist/scripts/src/components-core/action/APICall.js +0 -284
- package/dist/scripts/src/components-core/action/FileDownloadAction.js +0 -80
- package/dist/scripts/src/components-core/action/FileUploadAction.js +0 -88
- package/dist/scripts/src/components-core/action/NavigateAction.js +0 -20
- package/dist/scripts/src/components-core/action/TimedAction.js +0 -21
- package/dist/scripts/src/components-core/action/actions.js +0 -15
- package/dist/scripts/src/components-core/appContext/date-functions.js +0 -24
- package/dist/scripts/src/components-core/appContext/math-function.js +0 -27
- package/dist/scripts/src/components-core/appContext/misc-utils.js +0 -14
- package/dist/scripts/src/components-core/behaviors/Behavior.js +0 -2
- package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +0 -200
- package/dist/scripts/src/components-core/component-hooks.js +0 -25
- package/dist/scripts/src/components-core/constants.js +0 -18
- package/dist/scripts/src/components-core/descriptorHelper.js +0 -96
- package/dist/scripts/src/components-core/devtools/InspectorDialog.js +0 -135
- package/dist/scripts/src/components-core/devtools/InspectorDialogVisibilityContext.js +0 -8
- package/dist/scripts/src/components-core/event-handlers.js +0 -46
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +0 -247
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +0 -167
- package/dist/scripts/src/components-core/interception/Backend.js +0 -141
- package/dist/scripts/src/components-core/interception/Errors.js +0 -129
- package/dist/scripts/src/components-core/interception/InMemoryDb.js +0 -41
- package/dist/scripts/src/components-core/interception/IndexedDb.js +0 -205
- package/dist/scripts/src/components-core/interception/ReadonlyCollection.js +0 -145
- package/dist/scripts/src/components-core/interception/abstractions.js +0 -2
- package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +0 -44
- package/dist/scripts/src/components-core/interception/initMock.js +0 -20
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +0 -9
- package/dist/scripts/src/components-core/loader/ApiLoader.js +0 -54
- package/dist/scripts/src/components-core/loader/DataLoader.js +0 -330
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +0 -60
- package/dist/scripts/src/components-core/loader/Loader.js +0 -159
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +0 -43
- package/dist/scripts/src/components-core/loader/PageableLoader.js +0 -272
- package/dist/scripts/src/components-core/markup-check.js +0 -279
- package/dist/scripts/src/components-core/parts.js +0 -11
- package/dist/scripts/src/components-core/renderers.js +0 -76
- package/dist/scripts/src/components-core/rendering/AppContent.js +0 -400
- package/dist/scripts/src/components-core/rendering/AppRoot.js +0 -87
- package/dist/scripts/src/components-core/rendering/AppWrapper.js +0 -49
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +0 -380
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +0 -166
- package/dist/scripts/src/components-core/rendering/Container.js +0 -621
- package/dist/scripts/src/components-core/rendering/ContainerWrapper.js +0 -94
- package/dist/scripts/src/components-core/rendering/ErrorBoundary.js +0 -65
- package/dist/scripts/src/components-core/rendering/InvalidComponent.js +0 -17
- package/dist/scripts/src/components-core/rendering/StandaloneComponent.js +0 -39
- package/dist/scripts/src/components-core/rendering/StateContainer.js +0 -350
- package/dist/scripts/src/components-core/rendering/UnknownComponent.js +0 -15
- package/dist/scripts/src/components-core/rendering/buildProxy.js +0 -58
- package/dist/scripts/src/components-core/rendering/collectFnVarDeps.js +0 -49
- package/dist/scripts/src/components-core/rendering/containers.js +0 -19
- package/dist/scripts/src/components-core/rendering/nodeUtils.js +0 -6
- package/dist/scripts/src/components-core/rendering/reducer.js +0 -160
- package/dist/scripts/src/components-core/rendering/renderChild.js +0 -82
- package/dist/scripts/src/components-core/rendering/valueExtractor.js +0 -216
- package/dist/scripts/src/components-core/reportEngineError.js +0 -62
- package/dist/scripts/src/components-core/script-runner/AttributeValueParser.js +0 -117
- package/dist/scripts/src/components-core/script-runner/BindingTreeEvaluationContext.js +0 -33
- package/dist/scripts/src/components-core/script-runner/ParameterParser.js +0 -117
- package/dist/scripts/src/components-core/script-runner/ScriptingSourceTree.js +0 -45
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +0 -96
- package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +0 -34
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +0 -613
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +0 -439
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +0 -522
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +0 -761
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +0 -208
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +0 -746
- package/dist/scripts/src/components-core/script-runner/simplify-expression.js +0 -386
- package/dist/scripts/src/components-core/script-runner/statement-queue.js +0 -63
- package/dist/scripts/src/components-core/script-runner/visitors.js +0 -369
- package/dist/scripts/src/components-core/theming/StyleContext.js +0 -133
- package/dist/scripts/src/components-core/theming/StyleRegistry.js +0 -171
- package/dist/scripts/src/components-core/theming/ThemeContext.js +0 -53
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +0 -342
- package/dist/scripts/src/components-core/theming/component-layout-resolver.js +0 -153
- package/dist/scripts/src/components-core/theming/extendThemeUtils.js +0 -47
- package/dist/scripts/src/components-core/theming/hvar.js +0 -105
- package/dist/scripts/src/components-core/theming/layout-resolver.js +0 -388
- package/dist/scripts/src/components-core/theming/parse-layout-props.js +0 -136
- package/dist/scripts/src/components-core/theming/themeVars.js +0 -62
- package/dist/scripts/src/components-core/theming/themes/base-utils.js +0 -15
- package/dist/scripts/src/components-core/theming/themes/palette.js +0 -57
- package/dist/scripts/src/components-core/theming/themes/root.js +0 -434
- package/dist/scripts/src/components-core/theming/themes/solid.js +0 -16
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +0 -561
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +0 -57
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +0 -733
- package/dist/scripts/src/components-core/theming/utils.js +0 -31
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +0 -41
- package/dist/scripts/src/components-core/utils/LruCache.js +0 -184
- package/dist/scripts/src/components-core/utils/actionUtils.js +0 -32
- package/dist/scripts/src/components-core/utils/audio-utils.js +0 -83
- package/dist/scripts/src/components-core/utils/base64-utils.js +0 -124
- package/dist/scripts/src/components-core/utils/compound-utils.js +0 -11
- package/dist/scripts/src/components-core/utils/css-utils.js +0 -179
- package/dist/scripts/src/components-core/utils/date-utils.js +0 -186
- package/dist/scripts/src/components-core/utils/extractParam.js +0 -281
- package/dist/scripts/src/components-core/utils/hooks.js +0 -400
- package/dist/scripts/src/components-core/utils/mergeProps.js +0 -45
- package/dist/scripts/src/components-core/utils/misc.js +0 -539
- package/dist/scripts/src/components-core/utils/request-params.js +0 -70
- package/dist/scripts/src/components-core/utils/statementUtils.js +0 -224
- package/dist/scripts/src/components-core/utils/treeUtils.js +0 -226
- package/dist/scripts/src/components-core/xmlui-parser.js +0 -548
- package/dist/scripts/src/index-standalone.js +0 -61
- package/dist/scripts/src/index.js +0 -158
- package/dist/scripts/src/language-server/server-common.js +0 -152
- package/dist/scripts/src/language-server/server-web-worker.js +0 -47
- package/dist/scripts/src/language-server/server.js +0 -42
- package/dist/scripts/src/language-server/services/common/docs-generation.js +0 -73
- package/dist/scripts/src/language-server/services/common/lsp-utils.js +0 -9
- package/dist/scripts/src/language-server/services/common/metadata-utils.js +0 -157
- package/dist/scripts/src/language-server/services/common/syntax-node-utilities.js +0 -135
- package/dist/scripts/src/language-server/services/completion.js +0 -288
- package/dist/scripts/src/language-server/services/diagnostic.js +0 -19
- package/dist/scripts/src/language-server/services/format.js +0 -430
- package/dist/scripts/src/language-server/services/hover.js +0 -164
- package/dist/scripts/src/language-server/xmlui-metadata-generated.js +0 -16276
- package/dist/scripts/src/logging/LoggerContext.js +0 -22
- package/dist/scripts/src/logging/LoggerInitializer.js +0 -14
- package/dist/scripts/src/logging/LoggerService.js +0 -60
- package/dist/scripts/src/logging/xmlui.js +0 -21
- package/dist/scripts/src/parsers/common/GenericToken.js +0 -2
- package/dist/scripts/src/parsers/common/InputStream.js +0 -59
- package/dist/scripts/src/parsers/common/utils.js +0 -19
- package/dist/scripts/src/parsers/scripting/Lexer.js +0 -1097
- package/dist/scripts/src/parsers/scripting/Parser.js +0 -2638
- package/dist/scripts/src/parsers/scripting/ParserError.js +0 -47
- package/dist/scripts/src/parsers/scripting/ScriptingNodeTypes.js +0 -50
- package/dist/scripts/src/parsers/scripting/TokenTrait.js +0 -108
- package/dist/scripts/src/parsers/scripting/TokenType.js +0 -109
- package/dist/scripts/src/parsers/scripting/code-behind-collect.js +0 -101
- package/dist/scripts/src/parsers/scripting/modules.js +0 -105
- package/dist/scripts/src/parsers/scripting/tree-visitor.js +0 -601
- package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +0 -39
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +0 -623
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +0 -453
- package/dist/scripts/src/parsers/style-parser/errors.js +0 -37
- package/dist/scripts/src/parsers/style-parser/source-tree.js +0 -2
- package/dist/scripts/src/parsers/style-parser/tokens.js +0 -43
- package/dist/scripts/src/parsers/xmlui-parser/CharacterCodes.js +0 -136
- package/dist/scripts/src/parsers/xmlui-parser/ParserError.js +0 -60
- package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +0 -172
- package/dist/scripts/src/parsers/xmlui-parser/fileExtensions.js +0 -6
- package/dist/scripts/src/parsers/xmlui-parser/index.js +0 -29
- package/dist/scripts/src/parsers/xmlui-parser/lint.js +0 -165
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +0 -626
- package/dist/scripts/src/parsers/xmlui-parser/scanner.js +0 -415
- package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +0 -123
- package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +0 -67
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +0 -1131
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +0 -83
- package/dist/scripts/src/parsers/xmlui-parser/xmlui-serializer.js +0 -582
- package/dist/scripts/src/parsers/xmlui-parser/xmlui-tree.js +0 -2
- package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +0 -286
- package/dist/scripts/src/syntax/monaco/index.js +0 -14
- package/dist/scripts/src/syntax/monaco/xmlui-dark.js +0 -25
- package/dist/scripts/src/syntax/monaco/xmlui-light.js +0 -25
- package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +0 -310
- package/dist/scripts/src/syntax/textMate/index.js +0 -14
- package/dist/scripts/src/syntax/textMate/xmlui-dark.json +0 -631
- package/dist/scripts/src/syntax/textMate/xmlui-light.json +0 -565
- package/dist/scripts/src/syntax/textMate/xmlui.json +0 -564
- package/dist/scripts/src/syntax/textMate/xmlui.tmLanguage.json +0 -341
- package/dist/scripts/src/testing/ComponentDrivers.js +0 -1380
- package/dist/scripts/src/testing/assertions.js +0 -444
- package/dist/scripts/src/testing/component-test-helpers.js +0 -373
- package/dist/scripts/src/testing/drivers/DateInputDriver.js +0 -19
- package/dist/scripts/src/testing/drivers/ModalDialogDriver.js +0 -10
- package/dist/scripts/src/testing/drivers/NumberBoxDriver.js +0 -44
- package/dist/scripts/src/testing/drivers/TextBoxDriver.js +0 -20
- package/dist/scripts/src/testing/drivers/TimeInputDriver.js +0 -22
- package/dist/scripts/src/testing/drivers/TimerDriver.js +0 -64
- package/dist/scripts/src/testing/drivers/TreeDriver.js +0 -13
- package/dist/scripts/src/testing/drivers/index.js +0 -9
- package/dist/scripts/src/testing/fixtures.js +0 -519
- package/dist/scripts/src/testing/index.js +0 -69
- package/dist/scripts/src/testing/infrastructure/TestBed.js +0 -17
- package/dist/scripts/src/testing/infrastructure/main.js +0 -9
- package/dist/scripts/src/testing/infrastructure/public/mockServiceWorker.js +0 -266
- package/dist/scripts/src/testing/themed-app-test-helpers.js +0 -133
|
@@ -1,2839 +0,0 @@
|
|
|
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
|
-
const testData_1 = require("./testData");
|
|
15
|
-
// =============================================================================
|
|
16
|
-
// BASIC FUNCTIONALITY TESTS
|
|
17
|
-
// =============================================================================
|
|
18
|
-
fixtures_1.test.describe("Basic Functionality", () => {
|
|
19
|
-
(0, fixtures_1.test)("component renders with default props", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
20
|
-
yield initTestBed(`
|
|
21
|
-
<VStack height="400px">
|
|
22
|
-
<Tree testId="tree" dataFormat="flat" data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
23
|
-
<property name="itemTemplate">
|
|
24
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
25
|
-
<Icon name="folder" />
|
|
26
|
-
<Text value="{$item.name}" />
|
|
27
|
-
</HStack>
|
|
28
|
-
</property>
|
|
29
|
-
</Tree>
|
|
30
|
-
</VStack>
|
|
31
|
-
`);
|
|
32
|
-
const tree = yield createTreeDriver("tree");
|
|
33
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
34
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1")).toBeVisible();
|
|
35
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
36
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3")).not.toBeVisible();
|
|
37
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4")).not.toBeVisible();
|
|
38
|
-
}));
|
|
39
|
-
(0, fixtures_1.test)("displays flat data format correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
40
|
-
yield initTestBed(`
|
|
41
|
-
<VStack height="400px">
|
|
42
|
-
<Tree testId="tree" dataFormat="flat" defaultExpanded="all"
|
|
43
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
44
|
-
<property name="itemTemplate">
|
|
45
|
-
<HStack testId="{$item.id}:{$item.depth}" verticalAlignment="center">
|
|
46
|
-
<Icon name="folder" />
|
|
47
|
-
<Text value="{$item.name}" />
|
|
48
|
-
</HStack>
|
|
49
|
-
</property>
|
|
50
|
-
</Tree>
|
|
51
|
-
</VStack>
|
|
52
|
-
`);
|
|
53
|
-
const tree = yield createTreeDriver("tree");
|
|
54
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
55
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:0")).toBeVisible();
|
|
56
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:1")).toBeVisible();
|
|
57
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:1")).toBeVisible();
|
|
58
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:2")).toBeVisible();
|
|
59
|
-
}));
|
|
60
|
-
(0, fixtures_1.test)("displays hierarchy data format correctly", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
61
|
-
yield initTestBed(`
|
|
62
|
-
<VStack height="400px">
|
|
63
|
-
<Tree testId="tree" dataFormat="hierarchy" defaultExpanded="all"
|
|
64
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'>
|
|
65
|
-
<property name="itemTemplate">
|
|
66
|
-
<HStack testId="{$item.id}:{$item.depth}" verticalAlignment="center">
|
|
67
|
-
<Icon name="folder" />
|
|
68
|
-
<Text id="{$item.id}" value="{$item.name}" />
|
|
69
|
-
</HStack>
|
|
70
|
-
</property>
|
|
71
|
-
</Tree>
|
|
72
|
-
</VStack>
|
|
73
|
-
`);
|
|
74
|
-
const tree = yield createTreeDriver("tree");
|
|
75
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
76
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:0")).toBeVisible();
|
|
77
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:1")).toBeVisible();
|
|
78
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:1")).toBeVisible();
|
|
79
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:2")).toBeVisible();
|
|
80
|
-
}));
|
|
81
|
-
(0, fixtures_1.test)("uses flat as default data format when dataFormat is not specified", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
82
|
-
yield initTestBed(`
|
|
83
|
-
<VStack height="400px">
|
|
84
|
-
<Tree testId="tree" defaultExpanded="all"
|
|
85
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
86
|
-
<property name="itemTemplate">
|
|
87
|
-
<HStack testId="{$item.id}:{$item.depth}" verticalAlignment="center">
|
|
88
|
-
<Icon name="folder" />
|
|
89
|
-
<Text id="{$item.id}" value="{$item.name}" />
|
|
90
|
-
</HStack>
|
|
91
|
-
</property>
|
|
92
|
-
</Tree>
|
|
93
|
-
</VStack>
|
|
94
|
-
`);
|
|
95
|
-
const tree = yield createTreeDriver("tree");
|
|
96
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
97
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:0")).toBeVisible();
|
|
98
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:1")).toBeVisible();
|
|
99
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:1")).toBeVisible();
|
|
100
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:2")).toBeVisible();
|
|
101
|
-
}));
|
|
102
|
-
(0, fixtures_1.test)("handles custom idField, nameField, and parentIdField mapping", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
103
|
-
yield initTestBed(`
|
|
104
|
-
<VStack height="400px">
|
|
105
|
-
<Tree testId="tree"
|
|
106
|
-
dataFormat="flat"
|
|
107
|
-
defaultExpanded="all"
|
|
108
|
-
idField="nodeId"
|
|
109
|
-
nameField="title"
|
|
110
|
-
parentIdField="parent"
|
|
111
|
-
data='{${JSON.stringify(testData_1.customFieldsData1)}}'>
|
|
112
|
-
<property name="itemTemplate">
|
|
113
|
-
<HStack testId="{$item.nodeId}:{$item.depth}" verticalAlignment="center">
|
|
114
|
-
<Icon name="folder" />
|
|
115
|
-
<Text value="{$item.title}" />
|
|
116
|
-
</HStack>
|
|
117
|
-
</property>
|
|
118
|
-
</Tree>
|
|
119
|
-
</VStack>
|
|
120
|
-
`);
|
|
121
|
-
const tree = yield createTreeDriver("tree");
|
|
122
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
123
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A1:0")).toBeVisible();
|
|
124
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A2:1")).toBeVisible();
|
|
125
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A3:1")).toBeVisible();
|
|
126
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A4:2")).toBeVisible();
|
|
127
|
-
}));
|
|
128
|
-
(0, fixtures_1.test)("handles alternative field names (id, displayName, parentId)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
129
|
-
yield initTestBed(`
|
|
130
|
-
<VStack height="400px">
|
|
131
|
-
<Tree testId="tree"
|
|
132
|
-
dataFormat="flat"
|
|
133
|
-
defaultExpanded="all"
|
|
134
|
-
idField="id"
|
|
135
|
-
nameField="displayName"
|
|
136
|
-
parentIdField="parentId"
|
|
137
|
-
data='{${JSON.stringify(testData_1.customFieldsData2)}}'>
|
|
138
|
-
<property name="itemTemplate">
|
|
139
|
-
<HStack testId="{$item.id}:{$item.depth}" verticalAlignment="center">
|
|
140
|
-
<Icon name="folder" />
|
|
141
|
-
<Text value="{$item.displayName}" />
|
|
142
|
-
</HStack>
|
|
143
|
-
</property>
|
|
144
|
-
</Tree>
|
|
145
|
-
</VStack>
|
|
146
|
-
`);
|
|
147
|
-
const tree = yield createTreeDriver("tree");
|
|
148
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
149
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("100:0")).toBeVisible();
|
|
150
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("101:1")).toBeVisible();
|
|
151
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("102:1")).toBeVisible();
|
|
152
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("103:2")).toBeVisible();
|
|
153
|
-
}));
|
|
154
|
-
(0, fixtures_1.test)("handles database-style field names (pk, label, parent_id)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
155
|
-
yield initTestBed(`
|
|
156
|
-
<VStack height="400px">
|
|
157
|
-
<Tree testId="tree"
|
|
158
|
-
dataFormat="flat"
|
|
159
|
-
defaultExpanded="all"
|
|
160
|
-
idField="pk"
|
|
161
|
-
nameField="label"
|
|
162
|
-
parentIdField="parent_id"
|
|
163
|
-
data='{${JSON.stringify(testData_1.databaseStyleData)}}'>
|
|
164
|
-
<property name="itemTemplate">
|
|
165
|
-
<HStack testId="{$item.pk}:{$item.depth}" verticalAlignment="center">
|
|
166
|
-
<Icon name="folder" />
|
|
167
|
-
<Text value="{$item.label}" />
|
|
168
|
-
</HStack>
|
|
169
|
-
</property>
|
|
170
|
-
</Tree>
|
|
171
|
-
</VStack>
|
|
172
|
-
`);
|
|
173
|
-
const tree = yield createTreeDriver("tree");
|
|
174
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
175
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("root-1:0")).toBeVisible();
|
|
176
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("child-1:1")).toBeVisible();
|
|
177
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("child-2:1")).toBeVisible();
|
|
178
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("grandchild-1:2")).toBeVisible();
|
|
179
|
-
}));
|
|
180
|
-
(0, fixtures_1.test)("handles API-style field names (key, text, parentKey)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
181
|
-
yield initTestBed(`
|
|
182
|
-
<VStack height="400px">
|
|
183
|
-
<Tree testId="tree"
|
|
184
|
-
dataFormat="flat"
|
|
185
|
-
defaultExpanded="all"
|
|
186
|
-
idField="key"
|
|
187
|
-
nameField="text"
|
|
188
|
-
parentIdField="parentKey"
|
|
189
|
-
data='{${JSON.stringify(testData_1.apiStyleData)}}'>
|
|
190
|
-
<property name="itemTemplate">
|
|
191
|
-
<HStack testId="{$item.key}:{$item.depth}" verticalAlignment="center">
|
|
192
|
-
<Icon name="folder" />
|
|
193
|
-
<Text value="{$item.text}" />
|
|
194
|
-
</HStack>
|
|
195
|
-
</property>
|
|
196
|
-
</Tree>
|
|
197
|
-
</VStack>
|
|
198
|
-
`);
|
|
199
|
-
const tree = yield createTreeDriver("tree");
|
|
200
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
201
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item1:0")).toBeVisible();
|
|
202
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item2:1")).toBeVisible();
|
|
203
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item3:1")).toBeVisible();
|
|
204
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item4:2")).toBeVisible();
|
|
205
|
-
}));
|
|
206
|
-
(0, fixtures_1.test)("handles iconField mapping with default icon field name", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
207
|
-
yield initTestBed(`
|
|
208
|
-
<VStack height="400px">
|
|
209
|
-
<Tree testId="tree"
|
|
210
|
-
dataFormat="flat"
|
|
211
|
-
defaultExpanded="all"
|
|
212
|
-
data='{${JSON.stringify(testData_1.flatDataWithIcons)}}'>
|
|
213
|
-
<property name="itemTemplate">
|
|
214
|
-
<HStack testId="{$item.id}:icon:{$item.icon}" verticalAlignment="center">
|
|
215
|
-
<Text testId="icon:{$item.icon}" value="[{$item.icon}]" />
|
|
216
|
-
<Text value="{$item.name}" />
|
|
217
|
-
</HStack>
|
|
218
|
-
</property>
|
|
219
|
-
</Tree>
|
|
220
|
-
</VStack>
|
|
221
|
-
`);
|
|
222
|
-
const tree = yield createTreeDriver("tree");
|
|
223
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
224
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:folder")).toBeVisible();
|
|
225
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:file-pdf")).toBeVisible();
|
|
226
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:folder")).toBeVisible();
|
|
227
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:icon:file-image")).toBeVisible();
|
|
228
|
-
// Verify individual icon markers
|
|
229
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("icon:folder")).toBeVisible();
|
|
230
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("icon:file-pdf")).toBeVisible();
|
|
231
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("icon:file-image")).toBeVisible();
|
|
232
|
-
}));
|
|
233
|
-
(0, fixtures_1.test)("handles custom iconField mapping", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
234
|
-
yield initTestBed(`
|
|
235
|
-
<VStack height="400px">
|
|
236
|
-
<Tree testId="tree"
|
|
237
|
-
dataFormat="flat"
|
|
238
|
-
defaultExpanded="all"
|
|
239
|
-
idField="nodeId"
|
|
240
|
-
nameField="title"
|
|
241
|
-
iconField="iconType"
|
|
242
|
-
parentIdField="parent"
|
|
243
|
-
data='{${JSON.stringify(testData_1.customIconFieldData)}}'>
|
|
244
|
-
<property name="itemTemplate">
|
|
245
|
-
<HStack testId="{$item.nodeId}:icon:{$item.iconType}" verticalAlignment="center">
|
|
246
|
-
<Text testId="icon-type:{$item.iconType}" value="[{$item.iconType}]" />
|
|
247
|
-
<Text value="{$item.title}" />
|
|
248
|
-
</HStack>
|
|
249
|
-
</property>
|
|
250
|
-
</Tree>
|
|
251
|
-
</VStack>
|
|
252
|
-
`);
|
|
253
|
-
const tree = yield createTreeDriver("tree");
|
|
254
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
255
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A1:icon:project-folder")).toBeVisible();
|
|
256
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A2:icon:code-folder")).toBeVisible();
|
|
257
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A3:icon:typescript-file")).toBeVisible();
|
|
258
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A4:icon:typescript-file")).toBeVisible();
|
|
259
|
-
// Verify individual icon type markers
|
|
260
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("icon-type:project-folder")).toBeVisible();
|
|
261
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("icon-type:code-folder")).toBeVisible();
|
|
262
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("icon-type:typescript-file")).toBeVisible();
|
|
263
|
-
}));
|
|
264
|
-
(0, fixtures_1.test)("handles iconExpandedField and iconCollapsedField mapping", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
265
|
-
yield initTestBed(`
|
|
266
|
-
<VStack height="400px">
|
|
267
|
-
<Tree testId="tree"
|
|
268
|
-
dataFormat="flat"
|
|
269
|
-
iconField="icon"
|
|
270
|
-
iconExpandedField="iconExpanded"
|
|
271
|
-
iconCollapsedField="iconCollapsed"
|
|
272
|
-
data='{${JSON.stringify(testData_1.dataWithStateIcons)}}'>
|
|
273
|
-
<property name="itemTemplate">
|
|
274
|
-
<HStack testId="{$item.id}:icon:{$item.icon}:expanded:{$item.iconExpanded}:collapsed:{$item.iconCollapsed}" verticalAlignment="center">
|
|
275
|
-
<Text testId="state-icon:{$isExpanded ? $item.iconExpanded : $item.iconCollapsed}" value="[{$isExpanded ? $item.iconExpanded || $item.icon : $item.iconCollapsed || $item.icon}]" />
|
|
276
|
-
<Text value="{$item.name}" />
|
|
277
|
-
</HStack>
|
|
278
|
-
</property>
|
|
279
|
-
</Tree>
|
|
280
|
-
</VStack>
|
|
281
|
-
`);
|
|
282
|
-
const tree = yield createTreeDriver("tree");
|
|
283
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
284
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:folder:expanded:folder-open:collapsed:folder-closed")).toBeVisible();
|
|
285
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:folder:expanded:folder-open:collapsed:folder-closed")).not.toBeVisible(); // Should be collapsed initially
|
|
286
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:file-text:expanded:undefined:collapsed:undefined")).not.toBeVisible(); // Should be nested and collapsed
|
|
287
|
-
// Verify collapsed state icons are shown initially (since defaultExpanded is not set)
|
|
288
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("state-icon:folder-closed")).toBeVisible();
|
|
289
|
-
}));
|
|
290
|
-
(0, fixtures_1.test)("handles missing icon fields gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
291
|
-
yield initTestBed(`
|
|
292
|
-
<VStack height="400px">
|
|
293
|
-
<Tree testId="tree"
|
|
294
|
-
dataFormat="flat"
|
|
295
|
-
defaultExpanded="all"
|
|
296
|
-
iconField="nonExistentIcon"
|
|
297
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
298
|
-
<property name="itemTemplate">
|
|
299
|
-
<HStack testId="{$item.id}:icon:{$item.nonExistentIcon || 'no-icon'}" verticalAlignment="center">
|
|
300
|
-
<Text testId="fallback-icon:{$item.nonExistentIcon || 'default'}" value="[{$item.nonExistentIcon || 'default'}]" />
|
|
301
|
-
<Text value="{$item.name}" />
|
|
302
|
-
</HStack>
|
|
303
|
-
</property>
|
|
304
|
-
</Tree>
|
|
305
|
-
</VStack>
|
|
306
|
-
`);
|
|
307
|
-
const tree = yield createTreeDriver("tree");
|
|
308
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
309
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:no-icon")).toBeVisible();
|
|
310
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:no-icon")).toBeVisible();
|
|
311
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:no-icon")).toBeVisible();
|
|
312
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:icon:no-icon")).toBeVisible();
|
|
313
|
-
// Verify fallback icons
|
|
314
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("fallback-icon:default")).toBeVisible();
|
|
315
|
-
}));
|
|
316
|
-
// Selectable Field Mapping Tests
|
|
317
|
-
(0, fixtures_1.test)("handles default selectableField mapping (all nodes selectable by default)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
318
|
-
yield initTestBed(`
|
|
319
|
-
<VStack height="400px">
|
|
320
|
-
<Tree testId="tree"
|
|
321
|
-
dataFormat="flat"
|
|
322
|
-
defaultExpanded="all"
|
|
323
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
324
|
-
<property name="itemTemplate">
|
|
325
|
-
<HStack testId="{$item.id}:selectable:{$item.selectable}" verticalAlignment="center">
|
|
326
|
-
<Text value="{$item.name} (Selectable: {$item.selectable})" />
|
|
327
|
-
</HStack>
|
|
328
|
-
</property>
|
|
329
|
-
</Tree>
|
|
330
|
-
</VStack>
|
|
331
|
-
`);
|
|
332
|
-
const tree = yield createTreeDriver("tree");
|
|
333
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
334
|
-
// All nodes should be selectable by default (true)
|
|
335
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:selectable:true")).toBeVisible();
|
|
336
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:selectable:true")).toBeVisible();
|
|
337
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:selectable:true")).toBeVisible();
|
|
338
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:selectable:true")).toBeVisible();
|
|
339
|
-
}));
|
|
340
|
-
(0, fixtures_1.test)("handles custom selectableField mapping with mixed selectable states", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
341
|
-
const customSelectableData = [
|
|
342
|
-
{ id: "1", name: "Root Item 1", parentId: null, isSelectable: true },
|
|
343
|
-
{ id: "2", name: "Child Item 1.1", parentId: "1", isSelectable: false },
|
|
344
|
-
{ id: "3", name: "Child Item 1.2", parentId: "1", isSelectable: true },
|
|
345
|
-
{ id: "4", name: "Grandchild Item 1.1.1", parentId: "2", isSelectable: false },
|
|
346
|
-
{ id: "5", name: "Another Child", parentId: "1", isSelectable: true },
|
|
347
|
-
];
|
|
348
|
-
yield initTestBed(`
|
|
349
|
-
<VStack height="400px">
|
|
350
|
-
<Tree testId="tree"
|
|
351
|
-
dataFormat="flat"
|
|
352
|
-
defaultExpanded="all"
|
|
353
|
-
selectableField="isSelectable"
|
|
354
|
-
data='{${JSON.stringify(customSelectableData)}}'>
|
|
355
|
-
<property name="itemTemplate">
|
|
356
|
-
<HStack testId="{$item.id}:selectable:{$item.selectable}" verticalAlignment="center">
|
|
357
|
-
<Text value="{$item.name} - Selectable: {$item.selectable}" />
|
|
358
|
-
</HStack>
|
|
359
|
-
</property>
|
|
360
|
-
</Tree>
|
|
361
|
-
</VStack>
|
|
362
|
-
`);
|
|
363
|
-
const tree = yield createTreeDriver("tree");
|
|
364
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
365
|
-
// Verify mapped selectable states
|
|
366
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:selectable:true")).toBeVisible(); // Root selectable
|
|
367
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:selectable:false")).toBeVisible(); // Child not selectable
|
|
368
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:selectable:true")).toBeVisible(); // Child selectable
|
|
369
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:selectable:false")).toBeVisible(); // Grandchild not selectable
|
|
370
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("5:selectable:true")).toBeVisible(); // Another child selectable
|
|
371
|
-
}));
|
|
372
|
-
(0, fixtures_1.test)("handles selectableField with fallback to true when field is missing", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
373
|
-
const partialSelectableData = [
|
|
374
|
-
{ id: "1", name: "Root Item 1", parentId: null, canSelect: true },
|
|
375
|
-
{ id: "2", name: "Child Item 1.1", parentId: "1" }, // Missing canSelect field
|
|
376
|
-
{ id: "3", name: "Child Item 1.2", parentId: "1", canSelect: false },
|
|
377
|
-
{ id: "4", name: "Grandchild Item 1.1.1", parentId: "2" }, // Missing canSelect field
|
|
378
|
-
];
|
|
379
|
-
yield initTestBed(`
|
|
380
|
-
<VStack height="400px">
|
|
381
|
-
<Tree testId="tree"
|
|
382
|
-
dataFormat="flat"
|
|
383
|
-
defaultExpanded="all"
|
|
384
|
-
selectableField="canSelect"
|
|
385
|
-
data='{${JSON.stringify(partialSelectableData)}}'>
|
|
386
|
-
<property name="itemTemplate">
|
|
387
|
-
<HStack testId="{$item.id}:selectable:{$item.selectable}" verticalAlignment="center">
|
|
388
|
-
<Text value="{$item.name} - Selectable: {$item.selectable}" />
|
|
389
|
-
</HStack>
|
|
390
|
-
</property>
|
|
391
|
-
</Tree>
|
|
392
|
-
</VStack>
|
|
393
|
-
`);
|
|
394
|
-
const tree = yield createTreeDriver("tree");
|
|
395
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
396
|
-
// Verify fallback behavior: missing field defaults to true
|
|
397
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:selectable:true")).toBeVisible(); // Explicitly true
|
|
398
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:selectable:true")).toBeVisible(); // Missing field, defaults to true
|
|
399
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:selectable:false")).toBeVisible(); // Explicitly false
|
|
400
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:selectable:true")).toBeVisible(); // Missing field, defaults to true
|
|
401
|
-
}));
|
|
402
|
-
(0, fixtures_1.test)("handles selectableField in hierarchy data format", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
403
|
-
const hierarchySelectableData = [
|
|
404
|
-
{
|
|
405
|
-
id: "A1",
|
|
406
|
-
title: "Project",
|
|
407
|
-
allowSelection: true,
|
|
408
|
-
children: [
|
|
409
|
-
{
|
|
410
|
-
id: "A2",
|
|
411
|
-
title: "Source",
|
|
412
|
-
allowSelection: false,
|
|
413
|
-
children: [{ id: "A3", title: "App.tsx", allowSelection: true }],
|
|
414
|
-
},
|
|
415
|
-
{ id: "A4", title: "Tests", allowSelection: true },
|
|
416
|
-
],
|
|
417
|
-
},
|
|
418
|
-
];
|
|
419
|
-
yield initTestBed(`
|
|
420
|
-
<VStack height="400px">
|
|
421
|
-
<Tree testId="tree"
|
|
422
|
-
dataFormat="hierarchy"
|
|
423
|
-
defaultExpanded="all"
|
|
424
|
-
idField="id"
|
|
425
|
-
nameField="title"
|
|
426
|
-
selectableField="allowSelection"
|
|
427
|
-
childrenField="children"
|
|
428
|
-
data='{${JSON.stringify(hierarchySelectableData)}}'>
|
|
429
|
-
<property name="itemTemplate">
|
|
430
|
-
<HStack testId="{$item.id}:selectable:{$item.selectable}" verticalAlignment="center">
|
|
431
|
-
<Text value="{$item.title} - Selectable: {$item.selectable}" />
|
|
432
|
-
</HStack>
|
|
433
|
-
</property>
|
|
434
|
-
</Tree>
|
|
435
|
-
</VStack>
|
|
436
|
-
`);
|
|
437
|
-
const tree = yield createTreeDriver("tree");
|
|
438
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
439
|
-
// Verify hierarchy with selectableField mapping
|
|
440
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A1:selectable:true")).toBeVisible(); // Project selectable
|
|
441
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A2:selectable:false")).toBeVisible(); // Source not selectable
|
|
442
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A3:selectable:true")).toBeVisible(); // App.tsx selectable
|
|
443
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A4:selectable:true")).toBeVisible(); // Tests selectable
|
|
444
|
-
}));
|
|
445
|
-
(0, fixtures_1.test)("validates selectableField affects actual selection behavior", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
446
|
-
const selectableBehaviorData = [
|
|
447
|
-
{ id: "1", name: "Selectable Root", parentId: null, canClick: true },
|
|
448
|
-
{ id: "2", name: "Non-Selectable Child", parentId: "1", canClick: false },
|
|
449
|
-
{ id: "3", name: "Selectable Child", parentId: "1", canClick: true },
|
|
450
|
-
];
|
|
451
|
-
yield initTestBed(`
|
|
452
|
-
<VStack height="400px">
|
|
453
|
-
<Tree testId="tree"
|
|
454
|
-
dataFormat="flat"
|
|
455
|
-
defaultExpanded="all"
|
|
456
|
-
selectableField="canClick"
|
|
457
|
-
data='{${JSON.stringify(selectableBehaviorData)}}'>
|
|
458
|
-
<property name="itemTemplate">
|
|
459
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
460
|
-
<Text value="{$item.name} ({$item.selectable ? 'Clickable' : 'Not Clickable'})" />
|
|
461
|
-
</HStack>
|
|
462
|
-
</property>
|
|
463
|
-
</Tree>
|
|
464
|
-
</VStack>
|
|
465
|
-
`);
|
|
466
|
-
const tree = yield createTreeDriver("tree");
|
|
467
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
468
|
-
// Verify all nodes are visible
|
|
469
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1")).toBeVisible();
|
|
470
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
471
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3")).toBeVisible();
|
|
472
|
-
// Test selection behavior: selectable nodes should be clickable for selection
|
|
473
|
-
// This verifies that the selectable property is correctly mapped and used internally
|
|
474
|
-
const selectableNode = tree.getByTestId("1");
|
|
475
|
-
const nonSelectableNode = tree.getByTestId("2");
|
|
476
|
-
const anotherSelectableNode = tree.getByTestId("3");
|
|
477
|
-
// Click on selectable nodes - should work
|
|
478
|
-
yield selectableNode.click();
|
|
479
|
-
// Note: Detailed selection behavior testing would require checking internal state
|
|
480
|
-
// which might be tested in other selection-focused test cases
|
|
481
|
-
yield anotherSelectableNode.click();
|
|
482
|
-
// The actual selection assertion would depend on visible selection styling
|
|
483
|
-
// or other indicators that would be tested in selection-specific tests
|
|
484
|
-
}));
|
|
485
|
-
// Hierarchical Data Format Field Mapping Tests
|
|
486
|
-
(0, fixtures_1.test)("handles custom idField, nameField, and childrenField mapping for hierarchy data", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
487
|
-
yield initTestBed(`
|
|
488
|
-
<VStack height="400px">
|
|
489
|
-
<Tree testId="tree"
|
|
490
|
-
dataFormat="hierarchy"
|
|
491
|
-
defaultExpanded="all"
|
|
492
|
-
idField="nodeId"
|
|
493
|
-
nameField="title"
|
|
494
|
-
childrenField="items"
|
|
495
|
-
data='{${JSON.stringify(testData_1.customFieldsHierarchy1)}}'>
|
|
496
|
-
<property name="itemTemplate">
|
|
497
|
-
<HStack testId="{$item.nodeId}:{$item.depth}" verticalAlignment="center">
|
|
498
|
-
<Icon name="folder" />
|
|
499
|
-
<Text value="{$item.title}" />
|
|
500
|
-
</HStack>
|
|
501
|
-
</property>
|
|
502
|
-
</Tree>
|
|
503
|
-
</VStack>
|
|
504
|
-
`);
|
|
505
|
-
const tree = yield createTreeDriver("tree");
|
|
506
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
507
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A1:0")).toBeVisible();
|
|
508
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A2:1")).toBeVisible();
|
|
509
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A3:1")).toBeVisible();
|
|
510
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A4:2")).toBeVisible();
|
|
511
|
-
}));
|
|
512
|
-
(0, fixtures_1.test)("handles alternative hierarchy field names (id, displayName, subNodes)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
513
|
-
yield initTestBed(`
|
|
514
|
-
<VStack height="400px">
|
|
515
|
-
<Tree testId="tree"
|
|
516
|
-
dataFormat="hierarchy"
|
|
517
|
-
defaultExpanded="all"
|
|
518
|
-
idField="id"
|
|
519
|
-
nameField="displayName"
|
|
520
|
-
childrenField="subNodes"
|
|
521
|
-
data='{${JSON.stringify(testData_1.customFieldsHierarchy2)}}'>
|
|
522
|
-
<property name="itemTemplate">
|
|
523
|
-
<HStack testId="{$item.id}:{$item.depth}" verticalAlignment="center">
|
|
524
|
-
<Icon name="folder" />
|
|
525
|
-
<Text value="{$item.displayName}" />
|
|
526
|
-
</HStack>
|
|
527
|
-
</property>
|
|
528
|
-
</Tree>
|
|
529
|
-
</VStack>
|
|
530
|
-
`);
|
|
531
|
-
const tree = yield createTreeDriver("tree");
|
|
532
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
533
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("100:0")).toBeVisible();
|
|
534
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("101:1")).toBeVisible();
|
|
535
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("102:1")).toBeVisible();
|
|
536
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("103:2")).toBeVisible();
|
|
537
|
-
}));
|
|
538
|
-
(0, fixtures_1.test)("handles database-style hierarchy field names (pk, label, nested_items)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
539
|
-
yield initTestBed(`
|
|
540
|
-
<VStack height="400px">
|
|
541
|
-
<Tree testId="tree"
|
|
542
|
-
dataFormat="hierarchy"
|
|
543
|
-
defaultExpanded="all"
|
|
544
|
-
idField="pk"
|
|
545
|
-
nameField="label"
|
|
546
|
-
childrenField="nested_items"
|
|
547
|
-
data='{${JSON.stringify(testData_1.databaseStyleHierarchy)}}'>
|
|
548
|
-
<property name="itemTemplate">
|
|
549
|
-
<HStack testId="{$item.pk}:{$item.depth}" verticalAlignment="center">
|
|
550
|
-
<Icon name="folder" />
|
|
551
|
-
<Text value="{$item.label}" />
|
|
552
|
-
</HStack>
|
|
553
|
-
</property>
|
|
554
|
-
</Tree>
|
|
555
|
-
</VStack>
|
|
556
|
-
`);
|
|
557
|
-
const tree = yield createTreeDriver("tree");
|
|
558
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
559
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("root-1:0")).toBeVisible();
|
|
560
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("child-1:1")).toBeVisible();
|
|
561
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("child-2:1")).toBeVisible();
|
|
562
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("grandchild-1:2")).toBeVisible();
|
|
563
|
-
}));
|
|
564
|
-
(0, fixtures_1.test)("handles API-style hierarchy field names (key, text, nodes)", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
565
|
-
yield initTestBed(`
|
|
566
|
-
<VStack height="400px">
|
|
567
|
-
<Tree testId="tree"
|
|
568
|
-
dataFormat="hierarchy"
|
|
569
|
-
defaultExpanded="all"
|
|
570
|
-
idField="key"
|
|
571
|
-
nameField="text"
|
|
572
|
-
childrenField="nodes"
|
|
573
|
-
data='{${JSON.stringify(testData_1.apiStyleHierarchy)}}'>
|
|
574
|
-
<property name="itemTemplate">
|
|
575
|
-
<HStack testId="{$item.key}:{$item.depth}" verticalAlignment="center">
|
|
576
|
-
<Icon name="folder" />
|
|
577
|
-
<Text value="{$item.text}" />
|
|
578
|
-
</HStack>
|
|
579
|
-
</property>
|
|
580
|
-
</Tree>
|
|
581
|
-
</VStack>
|
|
582
|
-
`);
|
|
583
|
-
const tree = yield createTreeDriver("tree");
|
|
584
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
585
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item1:0")).toBeVisible();
|
|
586
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item2:1")).toBeVisible();
|
|
587
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item3:1")).toBeVisible();
|
|
588
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("item4:2")).toBeVisible();
|
|
589
|
-
}));
|
|
590
|
-
(0, fixtures_1.test)("handles iconField mapping in hierarchy data with default field name", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
591
|
-
yield initTestBed(`
|
|
592
|
-
<VStack height="400px">
|
|
593
|
-
<Tree testId="tree"
|
|
594
|
-
dataFormat="hierarchy"
|
|
595
|
-
defaultExpanded="all"
|
|
596
|
-
data='{${JSON.stringify(testData_1.hierarchyDataWithIcons)}}'>
|
|
597
|
-
<property name="itemTemplate">
|
|
598
|
-
<HStack testId="{$item.id}:icon:{$item.icon}" verticalAlignment="center">
|
|
599
|
-
<Text testId="hierarchy-icon:{$item.icon}" value="[{$item.icon}]" />
|
|
600
|
-
<Text value="{$item.name}" />
|
|
601
|
-
</HStack>
|
|
602
|
-
</property>
|
|
603
|
-
</Tree>
|
|
604
|
-
</VStack>
|
|
605
|
-
`);
|
|
606
|
-
const tree = yield createTreeDriver("tree");
|
|
607
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
608
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:folder")).toBeVisible();
|
|
609
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:file-pdf")).toBeVisible();
|
|
610
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:folder")).toBeVisible();
|
|
611
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:icon:file-image")).toBeVisible();
|
|
612
|
-
// Verify individual icon markers
|
|
613
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-icon:folder")).toBeVisible();
|
|
614
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-icon:file-pdf")).toBeVisible();
|
|
615
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-icon:file-image")).toBeVisible();
|
|
616
|
-
}));
|
|
617
|
-
(0, fixtures_1.test)("handles custom iconField mapping in hierarchy data", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
618
|
-
yield initTestBed(`
|
|
619
|
-
<VStack height="400px">
|
|
620
|
-
<Tree testId="tree"
|
|
621
|
-
dataFormat="hierarchy"
|
|
622
|
-
defaultExpanded="all"
|
|
623
|
-
idField="nodeId"
|
|
624
|
-
nameField="title"
|
|
625
|
-
iconField="iconType"
|
|
626
|
-
childrenField="items"
|
|
627
|
-
data='{${JSON.stringify(testData_1.customIconFieldHierarchy)}}'>
|
|
628
|
-
<property name="itemTemplate">
|
|
629
|
-
<HStack testId="{$item.nodeId}:icon:{$item.iconType}" verticalAlignment="center">
|
|
630
|
-
<Text testId="hierarchy-icon-type:{$item.iconType}" value="[{$item.iconType}]" />
|
|
631
|
-
<Text value="{$item.title}" />
|
|
632
|
-
</HStack>
|
|
633
|
-
</property>
|
|
634
|
-
</Tree>
|
|
635
|
-
</VStack>
|
|
636
|
-
`);
|
|
637
|
-
const tree = yield createTreeDriver("tree");
|
|
638
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
639
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A1:icon:project-folder")).toBeVisible();
|
|
640
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A2:icon:code-folder")).toBeVisible();
|
|
641
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A3:icon:typescript-file")).toBeVisible();
|
|
642
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A4:icon:typescript-file")).toBeVisible();
|
|
643
|
-
// Verify individual icon type markers
|
|
644
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-icon-type:project-folder")).toBeVisible();
|
|
645
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-icon-type:code-folder")).toBeVisible();
|
|
646
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-icon-type:typescript-file")).toBeVisible();
|
|
647
|
-
}));
|
|
648
|
-
(0, fixtures_1.test)("handles iconExpandedField and iconCollapsedField in hierarchy data", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
649
|
-
yield initTestBed(`
|
|
650
|
-
<VStack height="400px">
|
|
651
|
-
<Tree testId="tree"
|
|
652
|
-
dataFormat="hierarchy"
|
|
653
|
-
iconField="icon"
|
|
654
|
-
iconExpandedField="iconExpanded"
|
|
655
|
-
iconCollapsedField="iconCollapsed"
|
|
656
|
-
data='{${JSON.stringify(testData_1.hierarchyWithStateIcons)}}'>
|
|
657
|
-
<property name="itemTemplate">
|
|
658
|
-
<HStack testId="{$item.id}:icon:{$item.icon}:expanded:{$item.iconExpanded}:collapsed:{$item.iconCollapsed}" verticalAlignment="center">
|
|
659
|
-
<Text testId="hierarchy-state-icon:{$isExpanded ? $item.iconExpanded : $item.iconCollapsed}" value="[{$isExpanded ? $item.iconExpanded || $item.icon : $item.iconCollapsed || $item.icon}]" />
|
|
660
|
-
<Text value="{$item.name}" />
|
|
661
|
-
</HStack>
|
|
662
|
-
</property>
|
|
663
|
-
</Tree>
|
|
664
|
-
</VStack>
|
|
665
|
-
`);
|
|
666
|
-
const tree = yield createTreeDriver("tree");
|
|
667
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
668
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:folder:expanded:folder-open:collapsed:folder-closed")).toBeVisible();
|
|
669
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:folder:expanded:folder-open:collapsed:folder-closed")).not.toBeVisible(); // Should be collapsed initially
|
|
670
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:file-text:expanded:undefined:collapsed:undefined")).not.toBeVisible(); // Should be nested and collapsed
|
|
671
|
-
// Verify collapsed state icons are shown initially (since defaultExpanded is not set)
|
|
672
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-state-icon:folder-closed")).toBeVisible();
|
|
673
|
-
}));
|
|
674
|
-
(0, fixtures_1.test)("handles missing icon fields gracefully in hierarchy data", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
675
|
-
yield initTestBed(`
|
|
676
|
-
<VStack height="400px">
|
|
677
|
-
<Tree testId="tree"
|
|
678
|
-
dataFormat="hierarchy"
|
|
679
|
-
defaultExpanded="all"
|
|
680
|
-
iconField="nonExistentIcon"
|
|
681
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'>
|
|
682
|
-
<property name="itemTemplate">
|
|
683
|
-
<HStack testId="{$item.id}:icon:{$item.nonExistentIcon || 'no-icon'}" verticalAlignment="center">
|
|
684
|
-
<Text testId="hierarchy-fallback-icon:{$item.nonExistentIcon || 'default'}" value="[{$item.nonExistentIcon || 'default'}]" />
|
|
685
|
-
<Text value="{$item.name}" />
|
|
686
|
-
</HStack>
|
|
687
|
-
</property>
|
|
688
|
-
</Tree>
|
|
689
|
-
</VStack>
|
|
690
|
-
`);
|
|
691
|
-
const tree = yield createTreeDriver("tree");
|
|
692
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
693
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:no-icon")).toBeVisible();
|
|
694
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:no-icon")).toBeVisible();
|
|
695
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:no-icon")).toBeVisible();
|
|
696
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:icon:no-icon")).toBeVisible();
|
|
697
|
-
// Verify fallback icons
|
|
698
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("hierarchy-fallback-icon:default")).toBeVisible();
|
|
699
|
-
}));
|
|
700
|
-
// =============================================================================
|
|
701
|
-
// $ITEM CONTEXT PROPERTIES TESTS
|
|
702
|
-
// =============================================================================
|
|
703
|
-
(0, fixtures_1.test)("passes all core $item properties correctly to item template", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
704
|
-
yield initTestBed(`
|
|
705
|
-
<VStack height="400px">
|
|
706
|
-
<Tree testId="tree"
|
|
707
|
-
dataFormat="flat"
|
|
708
|
-
defaultExpanded="all"
|
|
709
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
710
|
-
<property name="itemTemplate">
|
|
711
|
-
<HStack testId="{$item.key}:props:name:{$item.name}|depth:{$item.depth}" verticalAlignment="center">
|
|
712
|
-
<Text value="{$item.name} (ID: {$item.id}, Key: {$item.key}, Depth: {$item.depth})" />
|
|
713
|
-
</HStack>
|
|
714
|
-
</property>
|
|
715
|
-
</Tree>
|
|
716
|
-
</VStack>
|
|
717
|
-
`);
|
|
718
|
-
const tree = yield createTreeDriver("tree");
|
|
719
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
720
|
-
// Verify core properties for different items
|
|
721
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:props:name:Root Item 1|depth:0")).toBeVisible();
|
|
722
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:props:name:Child Item 1.1|depth:1")).toBeVisible();
|
|
723
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:props:name:Child Item 1.2|depth:1")).toBeVisible();
|
|
724
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:props:name:Grandchild Item 1.1.1|depth:2")).toBeVisible();
|
|
725
|
-
}));
|
|
726
|
-
(0, fixtures_1.test)("passes original source data properties via $item spread", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
727
|
-
const dataWithExtraProps = [
|
|
728
|
-
{
|
|
729
|
-
id: 1,
|
|
730
|
-
name: "Root",
|
|
731
|
-
category: "folder",
|
|
732
|
-
size: "large",
|
|
733
|
-
customField: "value1",
|
|
734
|
-
parentId: null,
|
|
735
|
-
},
|
|
736
|
-
{ id: 2, name: "Child", category: "file", size: "small", customField: "value2", parentId: 1 },
|
|
737
|
-
];
|
|
738
|
-
yield initTestBed(`
|
|
739
|
-
<VStack height="400px">
|
|
740
|
-
<Tree testId="tree"
|
|
741
|
-
dataFormat="flat"
|
|
742
|
-
defaultExpanded="all"
|
|
743
|
-
data='{${JSON.stringify(dataWithExtraProps)}}'>
|
|
744
|
-
<property name="itemTemplate">
|
|
745
|
-
<HStack testId="{$item.id}:extra:{$item.category}:{$item.size}:{$item.customField}" verticalAlignment="center">
|
|
746
|
-
<Text value="{$item.name} - {$item.category} ({$item.size}) [{$item.customField}]" />
|
|
747
|
-
</HStack>
|
|
748
|
-
</property>
|
|
749
|
-
</Tree>
|
|
750
|
-
</VStack>
|
|
751
|
-
`);
|
|
752
|
-
const tree = yield createTreeDriver("tree");
|
|
753
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
754
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:extra:folder:large:value1")).toBeVisible();
|
|
755
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:extra:file:small:value2")).toBeVisible();
|
|
756
|
-
}));
|
|
757
|
-
(0, fixtures_1.test)("passes icon properties correctly via $item", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
758
|
-
yield initTestBed(`
|
|
759
|
-
<VStack height="400px">
|
|
760
|
-
<Tree testId="tree"
|
|
761
|
-
dataFormat="flat"
|
|
762
|
-
defaultExpanded="all"
|
|
763
|
-
data='{${JSON.stringify(testData_1.flatDataWithIcons)}}'>
|
|
764
|
-
<property name="itemTemplate">
|
|
765
|
-
<HStack testId="{$item.key}:icon:{$item.icon}" verticalAlignment="center">
|
|
766
|
-
<Text value="{$item.name} [{$item.icon}]" />
|
|
767
|
-
</HStack>
|
|
768
|
-
</property>
|
|
769
|
-
</Tree>
|
|
770
|
-
</VStack>
|
|
771
|
-
`);
|
|
772
|
-
const tree = yield createTreeDriver("tree");
|
|
773
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
774
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:icon:folder")).toBeVisible();
|
|
775
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:icon:file-pdf")).toBeVisible();
|
|
776
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:icon:folder")).toBeVisible();
|
|
777
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:icon:file-image")).toBeVisible();
|
|
778
|
-
}));
|
|
779
|
-
(0, fixtures_1.test)("passes TreeNode internal properties via $item spread", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
780
|
-
yield initTestBed(`
|
|
781
|
-
<VStack height="400px">
|
|
782
|
-
<Tree testId="tree"
|
|
783
|
-
dataFormat="flat"
|
|
784
|
-
defaultExpanded="all"
|
|
785
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
786
|
-
<property name="itemTemplate">
|
|
787
|
-
<HStack testId="{$item.key}:internal:selectable:{$item.selectable}" verticalAlignment="center">
|
|
788
|
-
<Text value="{$item.name} (Selectable: {$item.selectable})" />
|
|
789
|
-
</HStack>
|
|
790
|
-
</property>
|
|
791
|
-
</Tree>
|
|
792
|
-
</VStack>
|
|
793
|
-
`);
|
|
794
|
-
const tree = yield createTreeDriver("tree");
|
|
795
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
796
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:internal:selectable:true")).toBeVisible();
|
|
797
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:internal:selectable:true")).toBeVisible();
|
|
798
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:internal:selectable:true")).toBeVisible();
|
|
799
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:internal:selectable:true")).toBeVisible();
|
|
800
|
-
}));
|
|
801
|
-
(0, fixtures_1.test)("passes custom field mapped properties correctly in hierarchy format", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
802
|
-
yield initTestBed(`
|
|
803
|
-
<VStack height="400px">
|
|
804
|
-
<Tree testId="tree"
|
|
805
|
-
dataFormat="hierarchy"
|
|
806
|
-
defaultExpanded="all"
|
|
807
|
-
idField="nodeId"
|
|
808
|
-
nameField="title"
|
|
809
|
-
iconField="iconType"
|
|
810
|
-
childrenField="items"
|
|
811
|
-
data='{${JSON.stringify(testData_1.customIconFieldHierarchy)}}'>
|
|
812
|
-
<property name="itemTemplate">
|
|
813
|
-
<HStack testId="{$item.nodeId}:mapped:name:{$item.name}|title:{$item.title}|iconType:{$item.iconType}" verticalAlignment="center">
|
|
814
|
-
<Text value="Mapped: {$item.name} | Original: {$item.title} | Icon: {$item.iconType}" />
|
|
815
|
-
</HStack>
|
|
816
|
-
</property>
|
|
817
|
-
</Tree>
|
|
818
|
-
</VStack>
|
|
819
|
-
`);
|
|
820
|
-
const tree = yield createTreeDriver("tree");
|
|
821
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
822
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A1:mapped:name:Project|title:Project|iconType:project-folder")).toBeVisible();
|
|
823
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A2:mapped:name:Source|title:Source|iconType:code-folder")).toBeVisible();
|
|
824
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("A3:mapped:name:App.tsx|title:App.tsx|iconType:typescript-file")).toBeVisible();
|
|
825
|
-
}));
|
|
826
|
-
(0, fixtures_1.test)("validates $item properties maintain referential integrity across re-renders", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
827
|
-
yield initTestBed(`
|
|
828
|
-
<VStack height="400px">
|
|
829
|
-
<Tree testId="tree"
|
|
830
|
-
dataFormat="flat"
|
|
831
|
-
defaultExpanded="all"
|
|
832
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
833
|
-
<property name="itemTemplate">
|
|
834
|
-
<HStack testId="{$item.key}:integrity:name:{$item.name}" verticalAlignment="center">
|
|
835
|
-
<Text value="{$item.name}" />
|
|
836
|
-
</HStack>
|
|
837
|
-
</property>
|
|
838
|
-
</Tree>
|
|
839
|
-
</VStack>
|
|
840
|
-
`);
|
|
841
|
-
const tree = yield createTreeDriver("tree");
|
|
842
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
843
|
-
// Verify that basic properties are accessible and consistent
|
|
844
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:integrity:name:Root Item 1")).toBeVisible();
|
|
845
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:integrity:name:Child Item 1.1")).toBeVisible();
|
|
846
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:integrity:name:Child Item 1.2")).toBeVisible();
|
|
847
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:integrity:name:Grandchild Item 1.1.1")).toBeVisible();
|
|
848
|
-
}));
|
|
849
|
-
// =============================================================================
|
|
850
|
-
// SELECTION MANAGEMENT TESTS
|
|
851
|
-
// =============================================================================
|
|
852
|
-
fixtures_1.test.describe("Selection Management", () => {
|
|
853
|
-
(0, fixtures_1.test)("handles selectedValue property with visual feedback", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
854
|
-
const SELECTED_BG_COLOR = "rgb(255, 100, 100)";
|
|
855
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
856
|
-
yield initTestBed(`
|
|
857
|
-
<VStack height="400px">
|
|
858
|
-
<Tree testId="tree"
|
|
859
|
-
dataFormat="flat"
|
|
860
|
-
defaultExpanded="all"
|
|
861
|
-
selectedValue="{2}"
|
|
862
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
863
|
-
<property name="itemTemplate">
|
|
864
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
865
|
-
<Text value="{$item.name}" />
|
|
866
|
-
</HStack>
|
|
867
|
-
</property>
|
|
868
|
-
</Tree>
|
|
869
|
-
</VStack>
|
|
870
|
-
`, {
|
|
871
|
-
testThemeVars: {
|
|
872
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
873
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
874
|
-
},
|
|
875
|
-
});
|
|
876
|
-
const tree = yield createTreeDriver("tree");
|
|
877
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
878
|
-
const selectedRowWrapper = tree.getNodeWrapperByTestId("2");
|
|
879
|
-
const item1RowWrapper = tree.getNodeWrapperByTestId("1");
|
|
880
|
-
const item3RowWrapper = tree.getNodeWrapperByTestId("3");
|
|
881
|
-
const item4RowWrapper = tree.getNodeWrapperByTestId("4");
|
|
882
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toBeVisible();
|
|
883
|
-
// Test selected item has correct styling
|
|
884
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
885
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
886
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveClass(/selected/);
|
|
887
|
-
// Test non-selected items don't have selected styling
|
|
888
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
889
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
890
|
-
yield (0, fixtures_1.expect)(item4RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
891
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).not.toHaveClass(/selected/);
|
|
892
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).not.toHaveClass(/selected/);
|
|
893
|
-
yield (0, fixtures_1.expect)(item4RowWrapper).not.toHaveClass(/selected/);
|
|
894
|
-
}));
|
|
895
|
-
(0, fixtures_1.test)("handles selection with different selectedValue types", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
896
|
-
const SELECTED_BG_COLOR = "rgb(200, 100, 255)";
|
|
897
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
898
|
-
yield initTestBed(`
|
|
899
|
-
<VStack height="400px">
|
|
900
|
-
<Tree testId="tree"
|
|
901
|
-
dataFormat="flat"
|
|
902
|
-
defaultExpanded="all"
|
|
903
|
-
selectedValue="{3}"
|
|
904
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
905
|
-
<property name="itemTemplate">
|
|
906
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
907
|
-
<Text value="{$item.name}" />
|
|
908
|
-
</HStack>
|
|
909
|
-
</property>
|
|
910
|
-
</Tree>
|
|
911
|
-
</VStack>
|
|
912
|
-
`, {
|
|
913
|
-
testThemeVars: {
|
|
914
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
915
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
916
|
-
},
|
|
917
|
-
});
|
|
918
|
-
const tree = yield createTreeDriver("tree");
|
|
919
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
920
|
-
const item1RowWrapper = tree.getNodeWrapperByTestId("1");
|
|
921
|
-
const item2RowWrapper = tree.getNodeWrapperByTestId("2");
|
|
922
|
-
const item3RowWrapper = tree.getNodeWrapperByTestId("3");
|
|
923
|
-
const item4RowWrapper = tree.getNodeWrapperByTestId("4");
|
|
924
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toBeVisible();
|
|
925
|
-
// Item 3 should be selected (with proper string comparison handling)
|
|
926
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
927
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
928
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).toHaveClass(/selected/);
|
|
929
|
-
// Other items should not be selected
|
|
930
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
931
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
932
|
-
yield (0, fixtures_1.expect)(item4RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
933
|
-
// Verify class names are correctly applied
|
|
934
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).not.toHaveClass(/selected/);
|
|
935
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).not.toHaveClass(/selected/);
|
|
936
|
-
yield (0, fixtures_1.expect)(item4RowWrapper).not.toHaveClass(/selected/);
|
|
937
|
-
}));
|
|
938
|
-
(0, fixtures_1.test)("handles selection with type mismatch tolerance", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
939
|
-
const SELECTED_BG_COLOR = "rgb(100, 200, 50)";
|
|
940
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
941
|
-
yield initTestBed(`
|
|
942
|
-
<VStack height="400px">
|
|
943
|
-
<Tree testId="tree"
|
|
944
|
-
dataFormat="flat"
|
|
945
|
-
defaultExpanded="all"
|
|
946
|
-
selectedValue="{2}"
|
|
947
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
948
|
-
<property name="itemTemplate">
|
|
949
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
950
|
-
<Text value="{$item.name}" />
|
|
951
|
-
</HStack>
|
|
952
|
-
</property>
|
|
953
|
-
</Tree>
|
|
954
|
-
</VStack>
|
|
955
|
-
`, {
|
|
956
|
-
testThemeVars: {
|
|
957
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
958
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
959
|
-
},
|
|
960
|
-
});
|
|
961
|
-
const tree = yield createTreeDriver("tree");
|
|
962
|
-
// Get row wrapper directly using getNodeWrapperByMarker
|
|
963
|
-
const selectedRowWrapper = tree.getNodeWrapperByTestId("2");
|
|
964
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toBeVisible();
|
|
965
|
-
// Verify selection styling is applied correctly despite type mismatch (selectedValue: number vs itemKey: number)
|
|
966
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
967
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
968
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveClass(/selected/);
|
|
969
|
-
}));
|
|
970
|
-
(0, fixtures_1.test)("selection state overrides hover state styling", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
971
|
-
const SELECTED_BG_COLOR = "rgb(200, 0, 0)";
|
|
972
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
973
|
-
const HOVER_BG_COLOR = "rgb(0, 0, 200)";
|
|
974
|
-
const HOVER_TEXT_COLOR = "rgb(255, 255, 0)";
|
|
975
|
-
yield initTestBed(`
|
|
976
|
-
<VStack height="400px">
|
|
977
|
-
<Tree testId="tree"
|
|
978
|
-
dataFormat="flat"
|
|
979
|
-
defaultExpanded="all"
|
|
980
|
-
selectedValue="{2}"
|
|
981
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
982
|
-
<property name="itemTemplate">
|
|
983
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
984
|
-
<Text value="{$item.name}" />
|
|
985
|
-
</HStack>
|
|
986
|
-
</property>
|
|
987
|
-
</Tree>
|
|
988
|
-
</VStack>
|
|
989
|
-
`, {
|
|
990
|
-
testThemeVars: {
|
|
991
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
992
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
993
|
-
"backgroundColor-Tree-row--hover": HOVER_BG_COLOR,
|
|
994
|
-
"textColor-Tree--hover": HOVER_TEXT_COLOR,
|
|
995
|
-
},
|
|
996
|
-
});
|
|
997
|
-
const tree = yield createTreeDriver("tree");
|
|
998
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
999
|
-
const selectedRowWrapper = tree.getNodeWrapperByTestId("2");
|
|
1000
|
-
const item1RowWrapper = tree.getNodeWrapperByTestId("1");
|
|
1001
|
-
const item3RowWrapper = tree.getNodeWrapperByTestId("3");
|
|
1002
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toBeVisible();
|
|
1003
|
-
// Hover over the selected item - selection should override hover
|
|
1004
|
-
yield selectedRowWrapper.hover();
|
|
1005
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1006
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1007
|
-
// Hover over non-selected items - should show hover state
|
|
1008
|
-
yield item1RowWrapper.hover();
|
|
1009
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toHaveCSS("background-color", HOVER_BG_COLOR);
|
|
1010
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toHaveCSS("color", HOVER_TEXT_COLOR);
|
|
1011
|
-
yield item3RowWrapper.hover();
|
|
1012
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).toHaveCSS("background-color", HOVER_BG_COLOR);
|
|
1013
|
-
yield (0, fixtures_1.expect)(item3RowWrapper).toHaveCSS("color", HOVER_TEXT_COLOR);
|
|
1014
|
-
// Verify selected item maintains selection styling even after hovering other items
|
|
1015
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1016
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1017
|
-
}));
|
|
1018
|
-
(0, fixtures_1.test)("supports interactive selection changes", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
1019
|
-
const SELECTED_BG_COLOR = "rgb(200, 100, 255)";
|
|
1020
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
1021
|
-
const FOCUS_OUTLINE_COLOR = "rgb(255, 100, 100)";
|
|
1022
|
-
yield initTestBed(`
|
|
1023
|
-
<VStack height="400px">
|
|
1024
|
-
<Tree testId="tree"
|
|
1025
|
-
dataFormat="flat"
|
|
1026
|
-
defaultExpanded="all"
|
|
1027
|
-
selectedValue="{2}"
|
|
1028
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1029
|
-
<property name="itemTemplate">
|
|
1030
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1031
|
-
<Text value="{$item.name}" />
|
|
1032
|
-
</HStack>
|
|
1033
|
-
</property>
|
|
1034
|
-
</Tree>
|
|
1035
|
-
</VStack>
|
|
1036
|
-
`, {
|
|
1037
|
-
testThemeVars: {
|
|
1038
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
1039
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
1040
|
-
"outlineColor-Tree--focus": FOCUS_OUTLINE_COLOR,
|
|
1041
|
-
},
|
|
1042
|
-
});
|
|
1043
|
-
const tree = yield createTreeDriver("tree");
|
|
1044
|
-
yield tree.component.focus();
|
|
1045
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
1046
|
-
const item1RowWrapper = tree.getNodeWrapperByTestId("1");
|
|
1047
|
-
const item2RowWrapper = tree.getNodeWrapperByTestId("2");
|
|
1048
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toBeVisible();
|
|
1049
|
-
// Item 2 should be initially selected
|
|
1050
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1051
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1052
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).toHaveClass(/selected/);
|
|
1053
|
-
// Click on item 1 to change selection
|
|
1054
|
-
yield tree.getByTestId("1").click();
|
|
1055
|
-
// Item 1 should now be selected
|
|
1056
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1057
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1058
|
-
yield (0, fixtures_1.expect)(item1RowWrapper).toHaveClass(/selected/);
|
|
1059
|
-
// Item 2 should no longer be selected
|
|
1060
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1061
|
-
yield (0, fixtures_1.expect)(item2RowWrapper).not.toHaveClass(/selected/);
|
|
1062
|
-
// Verify the tree container maintains focus
|
|
1063
|
-
yield (0, fixtures_1.expect)(tree.component).toBeFocused();
|
|
1064
|
-
}));
|
|
1065
|
-
(0, fixtures_1.test)("handles null/undefined selection gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1066
|
-
const SELECTED_BG_COLOR = "rgb(255, 0, 0)";
|
|
1067
|
-
yield initTestBed(`
|
|
1068
|
-
<VStack height="400px">
|
|
1069
|
-
<Tree testId="tree"
|
|
1070
|
-
dataFormat="flat"
|
|
1071
|
-
defaultExpanded="all"
|
|
1072
|
-
selectedValue="{null}"
|
|
1073
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1074
|
-
<property name="itemTemplate">
|
|
1075
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1076
|
-
<Text value="{$item.name}" />
|
|
1077
|
-
</HStack>
|
|
1078
|
-
</property>
|
|
1079
|
-
</Tree>
|
|
1080
|
-
</VStack>
|
|
1081
|
-
`, {
|
|
1082
|
-
testThemeVars: {
|
|
1083
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
1084
|
-
},
|
|
1085
|
-
});
|
|
1086
|
-
const tree = yield createTreeDriver("tree");
|
|
1087
|
-
// Get row wrappers to test no selection highlighting
|
|
1088
|
-
const rowWrapper1 = tree.getNodeWrapperByTestId("1");
|
|
1089
|
-
const rowWrapper2 = tree.getNodeWrapperByTestId("2");
|
|
1090
|
-
const rowWrapper3 = tree.getNodeWrapperByTestId("3");
|
|
1091
|
-
const rowWrapper4 = tree.getNodeWrapperByTestId("4");
|
|
1092
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toBeVisible();
|
|
1093
|
-
// Verify no items are selected when selectedValue is null
|
|
1094
|
-
yield (0, fixtures_1.expect)(rowWrapper1).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1095
|
-
yield (0, fixtures_1.expect)(rowWrapper2).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1096
|
-
yield (0, fixtures_1.expect)(rowWrapper3).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1097
|
-
yield (0, fixtures_1.expect)(rowWrapper4).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1098
|
-
// Verify no items have selected class
|
|
1099
|
-
yield (0, fixtures_1.expect)(rowWrapper1).not.toHaveClass(/selected/);
|
|
1100
|
-
yield (0, fixtures_1.expect)(rowWrapper2).not.toHaveClass(/selected/);
|
|
1101
|
-
yield (0, fixtures_1.expect)(rowWrapper3).not.toHaveClass(/selected/);
|
|
1102
|
-
yield (0, fixtures_1.expect)(rowWrapper4).not.toHaveClass(/selected/);
|
|
1103
|
-
// Verify tree is still functional - can select items by clicking
|
|
1104
|
-
yield tree.getByTestId("2").click();
|
|
1105
|
-
yield (0, fixtures_1.expect)(rowWrapper2).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1106
|
-
yield (0, fixtures_1.expect)(rowWrapper2).toHaveClass(/selected/);
|
|
1107
|
-
}));
|
|
1108
|
-
(0, fixtures_1.test)("handles invalid selection values gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1109
|
-
const SELECTED_BG_COLOR = "rgb(0, 255, 0)";
|
|
1110
|
-
yield initTestBed(`
|
|
1111
|
-
<VStack height="400px">
|
|
1112
|
-
<Tree testId="tree"
|
|
1113
|
-
dataFormat="flat"
|
|
1114
|
-
defaultExpanded="all"
|
|
1115
|
-
selectedValue="999"
|
|
1116
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1117
|
-
<property name="itemTemplate">
|
|
1118
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1119
|
-
<Text value="{$item.name}" />
|
|
1120
|
-
</HStack>
|
|
1121
|
-
</property>
|
|
1122
|
-
</Tree>
|
|
1123
|
-
</VStack>
|
|
1124
|
-
`, {
|
|
1125
|
-
testThemeVars: {
|
|
1126
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
1127
|
-
},
|
|
1128
|
-
});
|
|
1129
|
-
const tree = yield createTreeDriver("tree");
|
|
1130
|
-
// Get row wrappers to test no selection highlighting
|
|
1131
|
-
const rowWrapper1 = tree.getNodeWrapperByTestId("1");
|
|
1132
|
-
const rowWrapper2 = tree.getNodeWrapperByTestId("2");
|
|
1133
|
-
const rowWrapper3 = tree.getNodeWrapperByTestId("3");
|
|
1134
|
-
const rowWrapper4 = tree.getNodeWrapperByTestId("4");
|
|
1135
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toBeVisible();
|
|
1136
|
-
// Verify component doesn't crash with invalid selectedValue and no items are selected
|
|
1137
|
-
yield (0, fixtures_1.expect)(rowWrapper1).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1138
|
-
yield (0, fixtures_1.expect)(rowWrapper2).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1139
|
-
yield (0, fixtures_1.expect)(rowWrapper3).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1140
|
-
yield (0, fixtures_1.expect)(rowWrapper4).not.toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1141
|
-
// Verify no items have selected class
|
|
1142
|
-
yield (0, fixtures_1.expect)(rowWrapper1).not.toHaveClass(/selected/);
|
|
1143
|
-
yield (0, fixtures_1.expect)(rowWrapper2).not.toHaveClass(/selected/);
|
|
1144
|
-
yield (0, fixtures_1.expect)(rowWrapper3).not.toHaveClass(/selected/);
|
|
1145
|
-
yield (0, fixtures_1.expect)(rowWrapper4).not.toHaveClass(/selected/);
|
|
1146
|
-
// Verify tree is still functional - can select valid items by clicking
|
|
1147
|
-
yield tree.getByTestId("3").click();
|
|
1148
|
-
yield (0, fixtures_1.expect)(rowWrapper3).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1149
|
-
yield (0, fixtures_1.expect)(rowWrapper3).toHaveClass(/selected/);
|
|
1150
|
-
}));
|
|
1151
|
-
// =============================================================================
|
|
1152
|
-
// FOCUS MANAGEMENT SUB-TESTS
|
|
1153
|
-
// =============================================================================
|
|
1154
|
-
(0, fixtures_1.test)("supports keyboard focus navigation with visual feedback", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, page, }) {
|
|
1155
|
-
const FOCUS_OUTLINE_COLOR = "rgb(255, 0, 255)";
|
|
1156
|
-
const FOCUS_OUTLINE_WIDTH = "3px";
|
|
1157
|
-
yield initTestBed(`
|
|
1158
|
-
<VStack height="400px">
|
|
1159
|
-
<Tree testId="tree"
|
|
1160
|
-
dataFormat="flat"
|
|
1161
|
-
defaultExpanded="all"
|
|
1162
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1163
|
-
<property name="itemTemplate">
|
|
1164
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1165
|
-
<Text value="{$item.name}" />
|
|
1166
|
-
</HStack>
|
|
1167
|
-
</property>
|
|
1168
|
-
</Tree>
|
|
1169
|
-
</VStack>
|
|
1170
|
-
`, {
|
|
1171
|
-
testThemeVars: {
|
|
1172
|
-
"outlineColor-Tree--focus": FOCUS_OUTLINE_COLOR,
|
|
1173
|
-
"outlineWidth-Tree--focus": FOCUS_OUTLINE_WIDTH,
|
|
1174
|
-
},
|
|
1175
|
-
});
|
|
1176
|
-
const tree = yield createTreeDriver("tree");
|
|
1177
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1")).toBeVisible();
|
|
1178
|
-
// Focus the tree to trigger focus styling
|
|
1179
|
-
yield tree.component.focus();
|
|
1180
|
-
// Use keyboard navigation to trigger focus on an item
|
|
1181
|
-
yield page.keyboard.press("ArrowDown");
|
|
1182
|
-
// The second item should be focused now
|
|
1183
|
-
const focusedItem = tree.getNodeWrapperByTestId("2");
|
|
1184
|
-
yield (0, fixtures_1.expect)(focusedItem).toBeVisible();
|
|
1185
|
-
// Check that focus outline uses custom theme variables
|
|
1186
|
-
// Focus styling uses inset box-shadow with the outline color
|
|
1187
|
-
yield (0, fixtures_1.expect)(focusedItem).toHaveCSS("box-shadow", `${FOCUS_OUTLINE_COLOR} 0px 0px 0px 2px inset`);
|
|
1188
|
-
// Also verify the focused item has the correct CSS class
|
|
1189
|
-
yield (0, fixtures_1.expect)(focusedItem).toHaveClass(/focused/);
|
|
1190
|
-
// Verify box-shadow contains the custom focus outline color
|
|
1191
|
-
const boxShadowValue = yield focusedItem.evaluate((el) => getComputedStyle(el).boxShadow);
|
|
1192
|
-
(0, fixtures_1.expect)(boxShadowValue).toContain(FOCUS_OUTLINE_COLOR);
|
|
1193
|
-
// Test that focus can move to different items
|
|
1194
|
-
yield page.keyboard.press("ArrowDown");
|
|
1195
|
-
const nextFocusedItem = tree.getNodeWrapperByTestId("4"); // Should be the grandchild
|
|
1196
|
-
yield (0, fixtures_1.expect)(nextFocusedItem).toHaveClass(/focused/);
|
|
1197
|
-
yield (0, fixtures_1.expect)(nextFocusedItem).toHaveCSS("box-shadow", `${FOCUS_OUTLINE_COLOR} 0px 0px 0px 2px inset`);
|
|
1198
|
-
// Previous item should no longer be focused
|
|
1199
|
-
yield (0, fixtures_1.expect)(focusedItem).not.toHaveClass(/focused/);
|
|
1200
|
-
// Navigate back up
|
|
1201
|
-
yield page.keyboard.press("ArrowUp");
|
|
1202
|
-
yield (0, fixtures_1.expect)(focusedItem).toHaveClass(/focused/);
|
|
1203
|
-
yield (0, fixtures_1.expect)(nextFocusedItem).not.toHaveClass(/focused/);
|
|
1204
|
-
}));
|
|
1205
|
-
(0, fixtures_1.test)("focus styling supports comprehensive theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, page, }) {
|
|
1206
|
-
const FOCUS_OUTLINE_COLOR = "rgb(0, 255, 0)";
|
|
1207
|
-
const FOCUS_OUTLINE_WIDTH = "4px";
|
|
1208
|
-
const FOCUS_OUTLINE_STYLE = "solid";
|
|
1209
|
-
const FOCUS_OUTLINE_OFFSET = "2px";
|
|
1210
|
-
yield initTestBed(`
|
|
1211
|
-
<VStack height="400px">
|
|
1212
|
-
<Tree testId="tree"
|
|
1213
|
-
dataFormat="flat"
|
|
1214
|
-
defaultExpanded="all"
|
|
1215
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1216
|
-
<property name="itemTemplate">
|
|
1217
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1218
|
-
<Text value="{$item.name}" />
|
|
1219
|
-
</HStack>
|
|
1220
|
-
</property>
|
|
1221
|
-
</Tree>
|
|
1222
|
-
</VStack>
|
|
1223
|
-
`, {
|
|
1224
|
-
testThemeVars: {
|
|
1225
|
-
"outlineColor-Tree--focus": FOCUS_OUTLINE_COLOR,
|
|
1226
|
-
"outlineWidth-Tree--focus": FOCUS_OUTLINE_WIDTH,
|
|
1227
|
-
"outlineStyle-Tree--focus": FOCUS_OUTLINE_STYLE,
|
|
1228
|
-
"outlineOffset-Tree--focus": FOCUS_OUTLINE_OFFSET,
|
|
1229
|
-
},
|
|
1230
|
-
});
|
|
1231
|
-
const tree = yield createTreeDriver("tree");
|
|
1232
|
-
yield (0, fixtures_1.expect)(tree.getNodeWrapperByTestId("1")).toBeVisible();
|
|
1233
|
-
// Focus the tree and navigate to an item
|
|
1234
|
-
yield tree.component.focus();
|
|
1235
|
-
yield page.keyboard.press("ArrowDown", { delay: 100 });
|
|
1236
|
-
// Test focused item has all custom theme variables applied
|
|
1237
|
-
const focusedItem = tree.getNodeWrapperByTestId("2");
|
|
1238
|
-
yield (0, fixtures_1.expect)(focusedItem).toHaveClass(/focused/);
|
|
1239
|
-
// Verify the focus outline uses all custom theme variables
|
|
1240
|
-
// Note: In the current implementation, focus uses inset box-shadow rather than outline
|
|
1241
|
-
// but the theme variables should still be available for potential outline styling
|
|
1242
|
-
const boxShadowValue = yield focusedItem.evaluate((el) => getComputedStyle(el).boxShadow);
|
|
1243
|
-
(0, fixtures_1.expect)(boxShadowValue).toContain("0, 255, 0"); // Check for green color components
|
|
1244
|
-
}));
|
|
1245
|
-
(0, fixtures_1.test)("combined selection and focus states work together", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, page, }) {
|
|
1246
|
-
const SELECTED_BG_COLOR = "rgb(255, 50, 50)";
|
|
1247
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
1248
|
-
const HOVER_BG_COLOR = "rgb(50, 255, 50)";
|
|
1249
|
-
const HOVER_TEXT_COLOR = "rgb(0, 0, 0)";
|
|
1250
|
-
const DEFAULT_TEXT_COLOR = "rgb(100, 100, 100)";
|
|
1251
|
-
const FOCUS_OUTLINE_COLOR = "rgb(50, 50, 255)";
|
|
1252
|
-
yield initTestBed(`
|
|
1253
|
-
<VStack height="400px">
|
|
1254
|
-
<Tree testId="tree"
|
|
1255
|
-
dataFormat="flat"
|
|
1256
|
-
defaultExpanded="all"
|
|
1257
|
-
selectedValue="{3}"
|
|
1258
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1259
|
-
<property name="itemTemplate">
|
|
1260
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1261
|
-
<Text value="{$item.name}" />
|
|
1262
|
-
</HStack>
|
|
1263
|
-
</property>
|
|
1264
|
-
</Tree>
|
|
1265
|
-
</VStack>
|
|
1266
|
-
`, {
|
|
1267
|
-
testThemeVars: {
|
|
1268
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
1269
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
1270
|
-
"backgroundColor-Tree-row--hover": HOVER_BG_COLOR,
|
|
1271
|
-
"textColor-Tree--hover": HOVER_TEXT_COLOR,
|
|
1272
|
-
"textColor-Tree": DEFAULT_TEXT_COLOR,
|
|
1273
|
-
"outlineColor-Tree--focus": FOCUS_OUTLINE_COLOR,
|
|
1274
|
-
},
|
|
1275
|
-
});
|
|
1276
|
-
const tree = yield createTreeDriver("tree");
|
|
1277
|
-
// Test all theme variables work correctly in isolation and combination
|
|
1278
|
-
const selectedRowWrapper = tree.getNodeWrapperByTestId("3");
|
|
1279
|
-
const normalRowWrapper = tree.getNodeWrapperByTestId("1");
|
|
1280
|
-
const hoverRowWrapper = tree.getNodeWrapperByTestId("2");
|
|
1281
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toBeVisible();
|
|
1282
|
-
// Test selected item styling
|
|
1283
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1284
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1285
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveClass(/selected/);
|
|
1286
|
-
// Test default text color on normal items
|
|
1287
|
-
yield (0, fixtures_1.expect)(normalRowWrapper).toHaveCSS("color", DEFAULT_TEXT_COLOR);
|
|
1288
|
-
yield (0, fixtures_1.expect)(normalRowWrapper).not.toHaveClass(/selected/);
|
|
1289
|
-
// Test hover styling on non-selected item
|
|
1290
|
-
yield hoverRowWrapper.hover();
|
|
1291
|
-
yield (0, fixtures_1.expect)(hoverRowWrapper).toHaveCSS("background-color", HOVER_BG_COLOR);
|
|
1292
|
-
yield (0, fixtures_1.expect)(hoverRowWrapper).toHaveCSS("color", HOVER_TEXT_COLOR);
|
|
1293
|
-
// Test hover on selected item (selection should override)
|
|
1294
|
-
yield selectedRowWrapper.hover();
|
|
1295
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1296
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1297
|
-
// Test focus styling - ensure we can detect focus
|
|
1298
|
-
yield tree.component.focus();
|
|
1299
|
-
// Give some time for focus to be applied
|
|
1300
|
-
yield page.waitForTimeout(100);
|
|
1301
|
-
// Check if any item has focus, or skip focus-specific checks for this comprehensive test
|
|
1302
|
-
// The focus behavior is already tested in the dedicated focus tests
|
|
1303
|
-
const anyFocusedElement = page.locator('[data-test-id="tree"] .focused');
|
|
1304
|
-
const hasFocusedElement = (yield anyFocusedElement.count()) > 0;
|
|
1305
|
-
if (hasFocusedElement) {
|
|
1306
|
-
// If we have focused elements, verify the color
|
|
1307
|
-
const focusedElement = anyFocusedElement.first();
|
|
1308
|
-
const finalBoxShadowValue = yield focusedElement.evaluate((el) => getComputedStyle(el).boxShadow);
|
|
1309
|
-
(0, fixtures_1.expect)(finalBoxShadowValue).toContain("50, 50, 255");
|
|
1310
|
-
}
|
|
1311
|
-
// If no focused element, skip focus-specific validation since focus behavior varies
|
|
1312
|
-
// Verify all theme variables are working simultaneously
|
|
1313
|
-
// Selected item maintains selection while tree has focus
|
|
1314
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1315
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1316
|
-
}));
|
|
1317
|
-
(0, fixtures_1.test)("applies selection and focus with multiple theme configurations", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, page, }) {
|
|
1318
|
-
const SELECTED_BG_COLOR = "rgb(50, 100, 200)";
|
|
1319
|
-
const SELECTED_TEXT_COLOR = "rgb(255, 255, 255)";
|
|
1320
|
-
const FOCUS_OUTLINE_COLOR = "rgb(255, 165, 0)";
|
|
1321
|
-
const DEFAULT_TEXT_COLOR = "rgb(64, 64, 64)";
|
|
1322
|
-
yield initTestBed(`
|
|
1323
|
-
<VStack height="400px">
|
|
1324
|
-
<Tree testId="tree"
|
|
1325
|
-
dataFormat="flat"
|
|
1326
|
-
defaultExpanded="all"
|
|
1327
|
-
selectedValue="{2}"
|
|
1328
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1329
|
-
<property name="itemTemplate">
|
|
1330
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
1331
|
-
<Text value="{$item.name}" />
|
|
1332
|
-
</HStack>
|
|
1333
|
-
</property>
|
|
1334
|
-
</Tree>
|
|
1335
|
-
</VStack>
|
|
1336
|
-
`, {
|
|
1337
|
-
testThemeVars: {
|
|
1338
|
-
"backgroundColor-Tree-row--selected": SELECTED_BG_COLOR,
|
|
1339
|
-
"textColor-Tree--selected": SELECTED_TEXT_COLOR,
|
|
1340
|
-
"outlineColor-Tree--focus": FOCUS_OUTLINE_COLOR,
|
|
1341
|
-
"textColor-Tree": DEFAULT_TEXT_COLOR,
|
|
1342
|
-
},
|
|
1343
|
-
});
|
|
1344
|
-
const tree = yield createTreeDriver("tree");
|
|
1345
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
1346
|
-
const selectedRowWrapper = tree.getNodeWrapperByTestId("2");
|
|
1347
|
-
const nonSelectedRowWrapper = tree.getNodeWrapperByTestId("1");
|
|
1348
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toBeVisible();
|
|
1349
|
-
// Test selection theme variables
|
|
1350
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("background-color", SELECTED_BG_COLOR);
|
|
1351
|
-
yield (0, fixtures_1.expect)(selectedRowWrapper).toHaveCSS("color", SELECTED_TEXT_COLOR);
|
|
1352
|
-
// Test default text color on non-selected items
|
|
1353
|
-
yield (0, fixtures_1.expect)(nonSelectedRowWrapper).toHaveCSS("color", DEFAULT_TEXT_COLOR);
|
|
1354
|
-
// Focus the tree and navigate to trigger focus styling
|
|
1355
|
-
yield tree.component.focus();
|
|
1356
|
-
yield page.keyboard.press("ArrowDown");
|
|
1357
|
-
// Check if any item received focus (focus behavior can be timing-dependent in tests)
|
|
1358
|
-
const focusedItem = page.locator('[data-test-id="tree"] .focused');
|
|
1359
|
-
const focusedItemCount = yield focusedItem.count();
|
|
1360
|
-
if (focusedItemCount > 0) {
|
|
1361
|
-
// If we have focused elements, verify the focus styling uses custom theme variables
|
|
1362
|
-
yield (0, fixtures_1.expect)(focusedItem.first()).toBeVisible();
|
|
1363
|
-
yield (0, fixtures_1.expect)(focusedItem.first()).toHaveCSS("box-shadow", `${FOCUS_OUTLINE_COLOR} 0px 0px 0px 2px inset`);
|
|
1364
|
-
}
|
|
1365
|
-
// If no focused element found, skip focus-specific validation as focus behavior is tested elsewhere
|
|
1366
|
-
}));
|
|
1367
|
-
});
|
|
1368
|
-
// =============================================================================
|
|
1369
|
-
// EXPANSION STATE TESTS
|
|
1370
|
-
// =============================================================================
|
|
1371
|
-
fixtures_1.test.describe("Expansion States", () => {
|
|
1372
|
-
(0, fixtures_1.test)("handles defaultExpanded none", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
1373
|
-
yield initTestBed(`
|
|
1374
|
-
<VStack height="400px">
|
|
1375
|
-
<Tree testId="tree"
|
|
1376
|
-
dataFormat="flat"
|
|
1377
|
-
defaultExpanded="none"
|
|
1378
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1379
|
-
<property name="itemTemplate">
|
|
1380
|
-
<HStack testId="{$item.id}:{$item.name}:depth:{$item.depth}" verticalAlignment="center">
|
|
1381
|
-
<Text value="{$item.name} (depth: {$item.depth})" />
|
|
1382
|
-
</HStack>
|
|
1383
|
-
</property>
|
|
1384
|
-
</Tree>
|
|
1385
|
-
</VStack>
|
|
1386
|
-
`);
|
|
1387
|
-
const tree = yield createTreeDriver("tree");
|
|
1388
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1389
|
-
// Only root level (depth 0) should be visible with defaultExpanded="none"
|
|
1390
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:Root Item 1:depth:0")).toBeVisible();
|
|
1391
|
-
// Child nodes (depth 1+) should NOT be visible initially
|
|
1392
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:Child Item 1.1:depth:1")).not.toBeVisible();
|
|
1393
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:Child Item 1.2:depth:1")).not.toBeVisible();
|
|
1394
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:Grandchild Item 1.1.1:depth:2")).not.toBeVisible();
|
|
1395
|
-
}));
|
|
1396
|
-
(0, fixtures_1.test)("handles defaultExpanded all", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
1397
|
-
yield initTestBed(`
|
|
1398
|
-
<VStack height="400px">
|
|
1399
|
-
<Tree testId="tree"
|
|
1400
|
-
dataFormat="flat"
|
|
1401
|
-
defaultExpanded="all"
|
|
1402
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1403
|
-
<property name="itemTemplate">
|
|
1404
|
-
<HStack testId="{$item.id}:{$item.name}:depth:{$item.depth}" verticalAlignment="center">
|
|
1405
|
-
<Text value="{$item.name} (depth: {$item.depth})" />
|
|
1406
|
-
</HStack>
|
|
1407
|
-
</property>
|
|
1408
|
-
</Tree>
|
|
1409
|
-
</VStack>
|
|
1410
|
-
`);
|
|
1411
|
-
const tree = yield createTreeDriver("tree");
|
|
1412
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1413
|
-
// All nodes at all depths should be visible with defaultExpanded="all"
|
|
1414
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:Root Item 1:depth:0")).toBeVisible();
|
|
1415
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:Child Item 1.1:depth:1")).toBeVisible();
|
|
1416
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:Child Item 1.2:depth:1")).toBeVisible();
|
|
1417
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:Grandchild Item 1.1.1:depth:2")).toBeVisible();
|
|
1418
|
-
}));
|
|
1419
|
-
(0, fixtures_1.test)("handles defaultExpanded first-level", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
1420
|
-
yield initTestBed(`
|
|
1421
|
-
<VStack height="400px">
|
|
1422
|
-
<Tree testId="tree"
|
|
1423
|
-
dataFormat="flat"
|
|
1424
|
-
defaultExpanded="first-level"
|
|
1425
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
1426
|
-
<property name="itemTemplate">
|
|
1427
|
-
<HStack testId="{$item.id}:{$item.name}:depth:{$item.depth}" verticalAlignment="center">
|
|
1428
|
-
<Text value="{$item.name} (depth: {$item.depth})" />
|
|
1429
|
-
</HStack>
|
|
1430
|
-
</property>
|
|
1431
|
-
</Tree>
|
|
1432
|
-
</VStack>
|
|
1433
|
-
`);
|
|
1434
|
-
const tree = yield createTreeDriver("tree");
|
|
1435
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1436
|
-
// Root level (depth 0) and first level (depth 1) should be visible
|
|
1437
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:Root Item 1:depth:0")).toBeVisible();
|
|
1438
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:Child Item 1.1:depth:1")).toBeVisible();
|
|
1439
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:Child Item 1.2:depth:1")).toBeVisible();
|
|
1440
|
-
// Second level and deeper (depth 2+) should NOT be visible
|
|
1441
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:Grandchild Item 1.1.1:depth:2")).not.toBeVisible();
|
|
1442
|
-
}));
|
|
1443
|
-
(0, fixtures_1.test)("handles defaultExpanded with array of string IDs - expands specific nodes making all children visible", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1444
|
-
yield initTestBed(`
|
|
1445
|
-
<VStack height="400px">
|
|
1446
|
-
<Tree testId="tree"
|
|
1447
|
-
dataFormat="flat"
|
|
1448
|
-
idField="pk"
|
|
1449
|
-
nameField="label"
|
|
1450
|
-
parentIdField="parent_id"
|
|
1451
|
-
defaultExpanded='{["root-1", "child-1"]}'
|
|
1452
|
-
data='{${JSON.stringify(testData_1.databaseStyleData)}}'>
|
|
1453
|
-
<property name="itemTemplate">
|
|
1454
|
-
<HStack testId="{$item.pk}:{$item.label}:depth:{$item.depth}:expanded" verticalAlignment="center">
|
|
1455
|
-
<Text value="{$item.label} (ID: {$item.pk}, Depth: {$item.depth})" />
|
|
1456
|
-
</HStack>
|
|
1457
|
-
</property>
|
|
1458
|
-
</Tree>
|
|
1459
|
-
</VStack>
|
|
1460
|
-
`);
|
|
1461
|
-
const tree = yield createTreeDriver("tree");
|
|
1462
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1463
|
-
// When defaultExpanded=["root-1", "child-1"], these specific nodes should be expanded:
|
|
1464
|
-
// 1. Root node "root-1" is expanded → its direct children become visible
|
|
1465
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("root-1:Root Item 1:depth:0:expanded")).toBeVisible();
|
|
1466
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("child-1:Child Item 1.1:depth:1:expanded")).toBeVisible();
|
|
1467
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("child-2:Child Item 1.2:depth:1:expanded")).toBeVisible();
|
|
1468
|
-
// 2. Child node "child-1" is also expanded → its children become visible
|
|
1469
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("grandchild-1:Grandchild Item 1.1.1:depth:2:expanded")).toBeVisible();
|
|
1470
|
-
// Verify expansion behavior: each ID in the array expands that specific node,
|
|
1471
|
-
// making its direct children visible. If a child is also in the expansion array,
|
|
1472
|
-
// it will also be expanded, showing its children recursively.
|
|
1473
|
-
}));
|
|
1474
|
-
(0, fixtures_1.test)("handles defaultExpanded array with nodes from different parent branches", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1475
|
-
yield initTestBed(`
|
|
1476
|
-
<VStack height="400px">
|
|
1477
|
-
<Tree testId="tree"
|
|
1478
|
-
dataFormat="flat"
|
|
1479
|
-
defaultExpanded='{["doc-root", "proj-web", "media-images"]}'
|
|
1480
|
-
data='{${JSON.stringify(testData_1.multiBranchTreeData)}}'>
|
|
1481
|
-
<property name="itemTemplate">
|
|
1482
|
-
<HStack testId="{$item.id}:{$item.name}:depth:{$item.depth}" verticalAlignment="center">
|
|
1483
|
-
<Text value="{$item.name} (ID: {$item.id}, Depth: {$item.depth})" />
|
|
1484
|
-
</HStack>
|
|
1485
|
-
</property>
|
|
1486
|
-
</Tree>
|
|
1487
|
-
</VStack>
|
|
1488
|
-
`);
|
|
1489
|
-
const tree = yield createTreeDriver("tree");
|
|
1490
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1491
|
-
// Branch A: "doc-root" is expanded → its direct children are visible
|
|
1492
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-root:Documents:depth:0")).toBeVisible();
|
|
1493
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-reports:Reports:depth:1")).toBeVisible();
|
|
1494
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-invoices:Invoices:depth:1")).toBeVisible();
|
|
1495
|
-
// But grandchildren of doc-root should NOT be visible (doc-reports not expanded)
|
|
1496
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-q1-report:Q1 Report.pdf:depth:2")).not.toBeVisible();
|
|
1497
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-inv-001:Invoice-001.pdf:depth:2")).not.toBeVisible();
|
|
1498
|
-
// Branch B: "proj-root" is auto-expanded because "proj-web" is in defaultExpanded
|
|
1499
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-root:Projects:depth:0")).toBeVisible();
|
|
1500
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-web:Web Apps:depth:1")).toBeVisible(); // Now visible due to auto-expansion
|
|
1501
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-mobile:Mobile Apps:depth:1")).toBeVisible(); // Also visible due to parent expansion
|
|
1502
|
-
// proj-web is expanded → its children are visible
|
|
1503
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-ecommerce:E-commerce Site:depth:2")).toBeVisible();
|
|
1504
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-dashboard:Admin Dashboard:depth:2")).toBeVisible();
|
|
1505
|
-
// proj-mobile is NOT expanded → its children remain hidden
|
|
1506
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-ios-app:iOS Shopping App:depth:2")).not.toBeVisible();
|
|
1507
|
-
// Branch C: "media-root" is auto-expanded because "media-images" is in defaultExpanded
|
|
1508
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-root:Media:depth:0")).toBeVisible();
|
|
1509
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-images:Images:depth:1")).toBeVisible(); // Now visible due to auto-expansion
|
|
1510
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-videos:Videos:depth:1")).toBeVisible(); // Also visible due to parent expansion
|
|
1511
|
-
// media-images is expanded → its children are visible
|
|
1512
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-profile-pic:profile.jpg:depth:2")).toBeVisible();
|
|
1513
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-banner:banner.png:depth:2")).toBeVisible();
|
|
1514
|
-
// This test validates that defaultExpanded array automatically expands parent paths:
|
|
1515
|
-
// 1. Each ID in defaultExpanded array is expanded AND its full parent path is auto-expanded
|
|
1516
|
-
// 2. Auto-expansion ensures target nodes are visible by expanding their parents
|
|
1517
|
-
// 3. Multiple independent branches can have different expansion states
|
|
1518
|
-
// 4. Only specifically targeted nodes (plus necessary parents) are expanded
|
|
1519
|
-
}));
|
|
1520
|
-
(0, fixtures_1.test)("handles defaultExpanded array expanding multiple independent root branches", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1521
|
-
yield initTestBed(`
|
|
1522
|
-
<VStack height="400px">
|
|
1523
|
-
<Tree testId="tree"
|
|
1524
|
-
dataFormat="flat"
|
|
1525
|
-
defaultExpanded='{["doc-root", "proj-root", "doc-reports", "proj-web"]}'
|
|
1526
|
-
data='{${JSON.stringify(testData_1.multiBranchTreeData)}}'>
|
|
1527
|
-
<property name="itemTemplate">
|
|
1528
|
-
<HStack testId="{$item.id}:{$item.name}:depth:{$item.depth}" verticalAlignment="center">
|
|
1529
|
-
<Text value="{$item.name} (ID: {$item.id}, Depth: {$item.depth})" />
|
|
1530
|
-
</HStack>
|
|
1531
|
-
</property>
|
|
1532
|
-
</Tree>
|
|
1533
|
-
</VStack>
|
|
1534
|
-
`);
|
|
1535
|
-
const tree = yield createTreeDriver("tree");
|
|
1536
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1537
|
-
// Branch A: "doc-root" expanded → children visible, "doc-reports" also expanded → grandchildren visible
|
|
1538
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-root:Documents:depth:0")).toBeVisible();
|
|
1539
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-reports:Reports:depth:1")).toBeVisible();
|
|
1540
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-invoices:Invoices:depth:1")).toBeVisible();
|
|
1541
|
-
// doc-reports is expanded → its children are visible
|
|
1542
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-q1-report:Q1 Report.pdf:depth:2")).toBeVisible();
|
|
1543
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-q2-report:Q2 Report.pdf:depth:2")).toBeVisible();
|
|
1544
|
-
// doc-invoices is NOT expanded → its children are hidden
|
|
1545
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-inv-001:Invoice-001.pdf:depth:2")).not.toBeVisible();
|
|
1546
|
-
// Branch B: "proj-root" expanded → children visible, "proj-web" also expanded → grandchildren visible
|
|
1547
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-root:Projects:depth:0")).toBeVisible();
|
|
1548
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-web:Web Apps:depth:1")).toBeVisible();
|
|
1549
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-mobile:Mobile Apps:depth:1")).toBeVisible();
|
|
1550
|
-
// proj-web is expanded → its children are visible
|
|
1551
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-ecommerce:E-commerce Site:depth:2")).toBeVisible();
|
|
1552
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-dashboard:Admin Dashboard:depth:2")).toBeVisible();
|
|
1553
|
-
// proj-mobile is NOT expanded → its children are hidden
|
|
1554
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-ios-app:iOS Shopping App:depth:2")).not.toBeVisible();
|
|
1555
|
-
// Branch C: "media-root" is NOT in defaultExpanded → children remain hidden
|
|
1556
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-root:Media:depth:0")).toBeVisible();
|
|
1557
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-images:Images:depth:1")).not.toBeVisible();
|
|
1558
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-videos:Videos:depth:1")).not.toBeVisible();
|
|
1559
|
-
// This test validates complete multi-branch expansion:
|
|
1560
|
-
// 1. Multiple root branches can be independently expanded
|
|
1561
|
-
// 2. Sub-nodes within expanded branches can also be selectively expanded
|
|
1562
|
-
// 3. Each expansion is isolated - expanding one branch doesn't affect others
|
|
1563
|
-
// 4. Deep nesting works correctly with selective expansion at each level
|
|
1564
|
-
}));
|
|
1565
|
-
(0, fixtures_1.test)("auto-expands parent paths for defaultExpanded array to ensure target nodes are visible", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1566
|
-
yield initTestBed(`
|
|
1567
|
-
<VStack height="400px">
|
|
1568
|
-
<Tree testId="tree"
|
|
1569
|
-
dataFormat="flat"
|
|
1570
|
-
defaultExpanded='{["proj-web", "media-images"]}'
|
|
1571
|
-
data='{${JSON.stringify(testData_1.multiBranchTreeData)}}'>
|
|
1572
|
-
<property name="itemTemplate">
|
|
1573
|
-
<HStack testId="{$item.id}:{$item.name}:depth:{$item.depth}" verticalAlignment="center">
|
|
1574
|
-
<Text value="{$item.name} (ID: {$item.id}, Depth: {$item.depth})" />
|
|
1575
|
-
</HStack>
|
|
1576
|
-
</property>
|
|
1577
|
-
</Tree>
|
|
1578
|
-
</VStack>
|
|
1579
|
-
`);
|
|
1580
|
-
const tree = yield createTreeDriver("tree");
|
|
1581
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
1582
|
-
// The key behavior: even though we only specified "proj-web" and "media-images" in defaultExpanded,
|
|
1583
|
-
// their parent paths should be automatically expanded to make them visible
|
|
1584
|
-
// Branch A: "doc-root" is NOT in defaultExpanded → should remain collapsed
|
|
1585
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-root:Documents:depth:0")).toBeVisible();
|
|
1586
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-reports:Reports:depth:1")).not.toBeVisible();
|
|
1587
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("doc-invoices:Invoices:depth:1")).not.toBeVisible();
|
|
1588
|
-
// Branch B: "proj-web" is in defaultExpanded → parent "proj-root" should auto-expand to make it visible
|
|
1589
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-root:Projects:depth:0")).toBeVisible();
|
|
1590
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-web:Web Apps:depth:1")).toBeVisible(); // Target node should be visible
|
|
1591
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-mobile:Mobile Apps:depth:1")).toBeVisible(); // Sibling visible due to parent expansion
|
|
1592
|
-
// proj-web is expanded → its children should be visible
|
|
1593
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-ecommerce:E-commerce Site:depth:2")).toBeVisible();
|
|
1594
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-dashboard:Admin Dashboard:depth:2")).toBeVisible();
|
|
1595
|
-
// proj-mobile is NOT expanded → its children remain hidden
|
|
1596
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("proj-ios-app:iOS Shopping App:depth:2")).not.toBeVisible();
|
|
1597
|
-
// Branch C: "media-images" is in defaultExpanded → parent "media-root" should auto-expand
|
|
1598
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-root:Media:depth:0")).toBeVisible();
|
|
1599
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-images:Images:depth:1")).toBeVisible(); // Target node should be visible
|
|
1600
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-videos:Videos:depth:1")).toBeVisible(); // Sibling visible due to parent expansion
|
|
1601
|
-
// media-images is expanded → its children should be visible
|
|
1602
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-profile-pic:profile.jpg:depth:2")).toBeVisible();
|
|
1603
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("media-banner:banner.png:depth:2")).toBeVisible();
|
|
1604
|
-
// This test validates the auto-expansion behavior:
|
|
1605
|
-
// 1. When a node ID is in defaultExpanded, all its parent nodes are automatically expanded
|
|
1606
|
-
// 2. This ensures the target node is visible and can display its expanded state
|
|
1607
|
-
// 3. Parent expansion makes sibling nodes visible but doesn't expand them
|
|
1608
|
-
// 4. Only the specifically targeted nodes (plus their parents) are expanded
|
|
1609
|
-
}));
|
|
1610
|
-
fixtures_1.test.skip("handles expandedValues property", component_test_helpers_1.SKIP_REASON.TO_BE_IMPLEMENTED(), (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1611
|
-
// TODO: Test controlled expansion state with expandedValues prop
|
|
1612
|
-
// TODO: Verify expansion state synchronization with external control
|
|
1613
|
-
yield initTestBed(`
|
|
1614
|
-
<Tree
|
|
1615
|
-
testId="tree"
|
|
1616
|
-
data="{flatTreeData}"
|
|
1617
|
-
dataFormat="flat"
|
|
1618
|
-
expandedValues="{[1]}"
|
|
1619
|
-
/>
|
|
1620
|
-
`);
|
|
1621
|
-
}));
|
|
1622
|
-
fixtures_1.test.skip("supports expansion toggle by chevron click", component_test_helpers_1.SKIP_REASON.TO_BE_IMPLEMENTED(), (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1623
|
-
// TODO: Test clicking expand/collapse chevron toggles node expansion
|
|
1624
|
-
// TODO: Verify child nodes become visible/hidden appropriately
|
|
1625
|
-
yield initTestBed(`
|
|
1626
|
-
<Tree
|
|
1627
|
-
testId="tree"
|
|
1628
|
-
data="{flatTreeData}"
|
|
1629
|
-
dataFormat="flat"
|
|
1630
|
-
/>
|
|
1631
|
-
`);
|
|
1632
|
-
}));
|
|
1633
|
-
fixtures_1.test.skip("supports expansion toggle by item click when enabled", component_test_helpers_1.SKIP_REASON.TO_BE_IMPLEMENTED(), (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1634
|
-
// TODO: Test itemClickExpands prop enables expansion on full item click
|
|
1635
|
-
// TODO: Verify clicking anywhere on item (not just chevron) toggles expansion
|
|
1636
|
-
yield initTestBed(`
|
|
1637
|
-
<Tree
|
|
1638
|
-
testId="tree"
|
|
1639
|
-
data="{flatTreeData}"
|
|
1640
|
-
dataFormat="flat"
|
|
1641
|
-
itemClickExpands="true"
|
|
1642
|
-
/>
|
|
1643
|
-
`);
|
|
1644
|
-
}));
|
|
1645
|
-
fixtures_1.test.skip("handles autoExpandToSelection", component_test_helpers_1.SKIP_REASON.TO_BE_IMPLEMENTED(), (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1646
|
-
// TODO: Test automatic expansion of path to selected item
|
|
1647
|
-
// TODO: Verify all parent nodes of selected item are expanded
|
|
1648
|
-
yield initTestBed(`
|
|
1649
|
-
<Tree
|
|
1650
|
-
testId="tree"
|
|
1651
|
-
data="{flatTreeData}"
|
|
1652
|
-
dataFormat="flat"
|
|
1653
|
-
selectedValue="4"
|
|
1654
|
-
autoExpandToSelection="true"
|
|
1655
|
-
/>
|
|
1656
|
-
`);
|
|
1657
|
-
}));
|
|
1658
|
-
});
|
|
1659
|
-
});
|
|
1660
|
-
// =============================================================================
|
|
1661
|
-
// EVENTS TESTS
|
|
1662
|
-
// =============================================================================
|
|
1663
|
-
fixtures_1.test.describe("Events", () => {
|
|
1664
|
-
fixtures_1.test.describe("selectionDidChange Event", () => {
|
|
1665
|
-
(0, fixtures_1.test)("fires when user clicks on a selectable node", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1666
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1667
|
-
<VStack height="400px">
|
|
1668
|
-
<Tree testId="tree"
|
|
1669
|
-
dataFormat="flat"
|
|
1670
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
1671
|
-
onSelectionDidChange="event => testState = event">
|
|
1672
|
-
<property name="itemTemplate">
|
|
1673
|
-
<HStack testId="{$item.id}">
|
|
1674
|
-
<Text value="{$item.name}" />
|
|
1675
|
-
</HStack>
|
|
1676
|
-
</property>
|
|
1677
|
-
</Tree>
|
|
1678
|
-
</VStack>
|
|
1679
|
-
`);
|
|
1680
|
-
const tree = yield createTreeDriver("tree");
|
|
1681
|
-
// Click on the first item
|
|
1682
|
-
yield tree.getByTestId("1").click();
|
|
1683
|
-
// Verify selectionDidChange event was fired with correct data
|
|
1684
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState()).toBeDefined();
|
|
1685
|
-
const event = yield testStateDriver.testState();
|
|
1686
|
-
(0, fixtures_1.expect)(event.newNode).toBeDefined();
|
|
1687
|
-
(0, fixtures_1.expect)(event.newNode.id).toBe(1);
|
|
1688
|
-
(0, fixtures_1.expect)(event.newNode.displayName).toBe("Root Item 1");
|
|
1689
|
-
(0, fixtures_1.expect)(event.previousNode).toBeNull();
|
|
1690
|
-
}));
|
|
1691
|
-
(0, fixtures_1.test)("fires with previous node when selection changes", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1692
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1693
|
-
<VStack height="400px">
|
|
1694
|
-
<Tree testId="tree"
|
|
1695
|
-
dataFormat="flat"
|
|
1696
|
-
defaultExpanded="all"
|
|
1697
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
1698
|
-
onSelectionDidChange="event => testState = event">
|
|
1699
|
-
<property name="itemTemplate">
|
|
1700
|
-
<HStack testId="{$item.id}">
|
|
1701
|
-
<Text value="{$item.name}" />
|
|
1702
|
-
</HStack>
|
|
1703
|
-
</property>
|
|
1704
|
-
</Tree>
|
|
1705
|
-
</VStack>
|
|
1706
|
-
`);
|
|
1707
|
-
const tree = yield createTreeDriver("tree");
|
|
1708
|
-
// First selection
|
|
1709
|
-
yield tree.getByTestId("1").click();
|
|
1710
|
-
// Second selection
|
|
1711
|
-
yield tree.getByTestId("2").click();
|
|
1712
|
-
// Verify event has both previous and new node
|
|
1713
|
-
yield fixtures_1.expect.poll(() => { var _a; return (_a = testStateDriver.testState()) === null || _a === void 0 ? void 0 : _a.then((s) => { var _a; return (_a = s === null || s === void 0 ? void 0 : s.newNode) === null || _a === void 0 ? void 0 : _a.id; }); }).toBe(2);
|
|
1714
|
-
const event = yield testStateDriver.testState();
|
|
1715
|
-
(0, fixtures_1.expect)(event.previousNode.id).toBe(1);
|
|
1716
|
-
}));
|
|
1717
|
-
});
|
|
1718
|
-
fixtures_1.test.describe("nodeDidExpand Event", () => {
|
|
1719
|
-
(0, fixtures_1.test)("fires after successful node expansion", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
1720
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1721
|
-
<VStack height="400px">
|
|
1722
|
-
<Tree testId="tree"
|
|
1723
|
-
dataFormat="hierarchy"
|
|
1724
|
-
itemClickExpands="true"
|
|
1725
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1726
|
-
onNodeDidExpand="node => testState = node">
|
|
1727
|
-
<property name="itemTemplate">
|
|
1728
|
-
<HStack testId="{$item.id}">
|
|
1729
|
-
<Text value="{$item.name}" />
|
|
1730
|
-
</HStack>
|
|
1731
|
-
</property>
|
|
1732
|
-
</Tree>
|
|
1733
|
-
</VStack>
|
|
1734
|
-
`);
|
|
1735
|
-
const tree = yield createTreeDriver("tree");
|
|
1736
|
-
// Click to expand first node
|
|
1737
|
-
yield tree.getByTestId("1").click();
|
|
1738
|
-
// Verify nodeDidExpand event fired
|
|
1739
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
1740
|
-
// Verify child is now visible
|
|
1741
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
1742
|
-
}));
|
|
1743
|
-
});
|
|
1744
|
-
fixtures_1.test.describe("nodeDidCollapse Event", () => {
|
|
1745
|
-
(0, fixtures_1.test)("fires after successful node collapse", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
1746
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1747
|
-
<VStack height="400px">
|
|
1748
|
-
<Tree testId="tree"
|
|
1749
|
-
dataFormat="hierarchy"
|
|
1750
|
-
itemClickExpands="true"
|
|
1751
|
-
defaultExpanded="all"
|
|
1752
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1753
|
-
onNodeDidCollapse="node => testState = node">
|
|
1754
|
-
<property name="itemTemplate">
|
|
1755
|
-
<HStack testId="{$item.id}">
|
|
1756
|
-
<Text value="{$item.name}" />
|
|
1757
|
-
</HStack>
|
|
1758
|
-
</property>
|
|
1759
|
-
</Tree>
|
|
1760
|
-
</VStack>
|
|
1761
|
-
`);
|
|
1762
|
-
const tree = yield createTreeDriver("tree");
|
|
1763
|
-
// First, verify child is visible (node starts expanded)
|
|
1764
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
1765
|
-
// Click to collapse expanded node
|
|
1766
|
-
yield tree.getByTestId("1").click();
|
|
1767
|
-
// Verify nodeDidCollapse fired with correct node
|
|
1768
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
1769
|
-
// Verify child is no longer visible
|
|
1770
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
1771
|
-
}));
|
|
1772
|
-
// Note: Additional collapse tests can be added when TreeDriver supports programmatic collapse operations
|
|
1773
|
-
});
|
|
1774
|
-
// =============================================================================
|
|
1775
|
-
// KEYBOARD EVENT TESTS
|
|
1776
|
-
// =============================================================================
|
|
1777
|
-
fixtures_1.test.describe("Keyboard Events", () => {
|
|
1778
|
-
fixtures_1.test.describe("selectionDidChange Event via Keyboard", () => {
|
|
1779
|
-
(0, fixtures_1.test)("fires when Enter key is pressed on a selectable node", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1780
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1781
|
-
<VStack height="400px">
|
|
1782
|
-
<Tree testId="tree"
|
|
1783
|
-
dataFormat="flat"
|
|
1784
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
1785
|
-
onSelectionDidChange="event => testState = event">
|
|
1786
|
-
<property name="itemTemplate">
|
|
1787
|
-
<HStack testId="{$item.id}">
|
|
1788
|
-
<Text value="{$item.name}" />
|
|
1789
|
-
</HStack>
|
|
1790
|
-
</property>
|
|
1791
|
-
</Tree>
|
|
1792
|
-
</VStack>
|
|
1793
|
-
`);
|
|
1794
|
-
const tree = yield createTreeDriver("tree");
|
|
1795
|
-
// Focus the tree and navigate to first item
|
|
1796
|
-
yield tree.component.focus();
|
|
1797
|
-
// Press Enter to select the focused node
|
|
1798
|
-
yield tree.component.press("Enter");
|
|
1799
|
-
// Verify selectionDidChange event was fired with correct data
|
|
1800
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState()).toBeDefined();
|
|
1801
|
-
const event = yield testStateDriver.testState();
|
|
1802
|
-
(0, fixtures_1.expect)(event.newNode).toBeDefined();
|
|
1803
|
-
(0, fixtures_1.expect)(event.newNode.id).toBe(1);
|
|
1804
|
-
(0, fixtures_1.expect)(event.newNode.displayName).toBe("Root Item 1");
|
|
1805
|
-
(0, fixtures_1.expect)(event.previousNode).toBeNull();
|
|
1806
|
-
}));
|
|
1807
|
-
(0, fixtures_1.test)("fires when Space key is pressed on a selectable node", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1808
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1809
|
-
<VStack height="400px">
|
|
1810
|
-
<Tree testId="tree"
|
|
1811
|
-
dataFormat="flat"
|
|
1812
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
1813
|
-
onSelectionDidChange="event => testState = event">
|
|
1814
|
-
<property name="itemTemplate">
|
|
1815
|
-
<HStack testId="{$item.id}">
|
|
1816
|
-
<Text value="{$item.name}" />
|
|
1817
|
-
</HStack>
|
|
1818
|
-
</property>
|
|
1819
|
-
</Tree>
|
|
1820
|
-
</VStack>
|
|
1821
|
-
`);
|
|
1822
|
-
const tree = yield createTreeDriver("tree");
|
|
1823
|
-
// Focus the tree (this starts focus on first item)
|
|
1824
|
-
yield tree.component.focus();
|
|
1825
|
-
// Press Space to select the currently focused node (should be first node)
|
|
1826
|
-
yield tree.component.press("Space");
|
|
1827
|
-
// Verify selectionDidChange event was fired with correct data
|
|
1828
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState()).toBeDefined();
|
|
1829
|
-
const event = yield testStateDriver.testState();
|
|
1830
|
-
(0, fixtures_1.expect)(event.newNode).toBeDefined();
|
|
1831
|
-
(0, fixtures_1.expect)(event.newNode.id).toBe(1); // Should be first node since we didn't navigate
|
|
1832
|
-
(0, fixtures_1.expect)(event.newNode.displayName).toBe("Root Item 1");
|
|
1833
|
-
(0, fixtures_1.expect)(event.previousNode).toBeNull();
|
|
1834
|
-
}));
|
|
1835
|
-
(0, fixtures_1.test)("fires with previous node when selection changes via keyboard", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1836
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1837
|
-
<VStack height="400px">
|
|
1838
|
-
<Tree testId="tree"
|
|
1839
|
-
dataFormat="flat"
|
|
1840
|
-
defaultExpanded="all"
|
|
1841
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
1842
|
-
onSelectionDidChange="event => testState = event">
|
|
1843
|
-
<property name="itemTemplate">
|
|
1844
|
-
<HStack testId="{$item.id}">
|
|
1845
|
-
<Text value="{$item.name}" />
|
|
1846
|
-
</HStack>
|
|
1847
|
-
</property>
|
|
1848
|
-
</Tree>
|
|
1849
|
-
</VStack>
|
|
1850
|
-
`);
|
|
1851
|
-
const tree = yield createTreeDriver("tree");
|
|
1852
|
-
// Click to select first node (using mouse to establish baseline)
|
|
1853
|
-
yield tree.getByTestId("1").click();
|
|
1854
|
-
// Now use keyboard to navigate and select second node
|
|
1855
|
-
yield tree.component.focus();
|
|
1856
|
-
yield tree.component.press("ArrowDown"); // Navigate to second node
|
|
1857
|
-
yield tree.component.press("Enter"); // Select it
|
|
1858
|
-
// Verify event has both previous and new node
|
|
1859
|
-
yield fixtures_1.expect.poll(() => { var _a; return (_a = testStateDriver.testState()) === null || _a === void 0 ? void 0 : _a.then((s) => { var _a; return (_a = s === null || s === void 0 ? void 0 : s.newNode) === null || _a === void 0 ? void 0 : _a.id; }); }).toBe(2);
|
|
1860
|
-
const event = yield testStateDriver.testState();
|
|
1861
|
-
(0, fixtures_1.expect)(event.previousNode.id).toBe(1);
|
|
1862
|
-
(0, fixtures_1.expect)(event.newNode.id).toBe(2);
|
|
1863
|
-
}));
|
|
1864
|
-
});
|
|
1865
|
-
fixtures_1.test.describe("nodeDidExpand Event via Keyboard", () => {
|
|
1866
|
-
(0, fixtures_1.test)("fires when Right arrow key expands a collapsed node", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1867
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1868
|
-
<VStack height="400px">
|
|
1869
|
-
<Tree testId="tree"
|
|
1870
|
-
dataFormat="hierarchy"
|
|
1871
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1872
|
-
onNodeDidExpand="node => testState = node">
|
|
1873
|
-
<property name="itemTemplate">
|
|
1874
|
-
<HStack testId="{$item.id}">
|
|
1875
|
-
<Text value="{$item.name}" />
|
|
1876
|
-
</HStack>
|
|
1877
|
-
</property>
|
|
1878
|
-
</Tree>
|
|
1879
|
-
</VStack>
|
|
1880
|
-
`);
|
|
1881
|
-
const tree = yield createTreeDriver("tree");
|
|
1882
|
-
// Focus the tree (first node should be focused)
|
|
1883
|
-
yield tree.component.focus();
|
|
1884
|
-
// Press Right arrow to expand the first node
|
|
1885
|
-
yield tree.component.press("ArrowRight");
|
|
1886
|
-
// Verify nodeDidExpand event fired
|
|
1887
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
1888
|
-
// Verify child is now visible
|
|
1889
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
1890
|
-
}));
|
|
1891
|
-
(0, fixtures_1.test)("fires when Enter key expands a collapsed node with children", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1892
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1893
|
-
<VStack height="400px">
|
|
1894
|
-
<Tree testId="tree"
|
|
1895
|
-
dataFormat="hierarchy"
|
|
1896
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1897
|
-
onNodeDidExpand="node => testState = node">
|
|
1898
|
-
<property name="itemTemplate">
|
|
1899
|
-
<HStack testId="{$item.id}">
|
|
1900
|
-
<Text value="{$item.name}" />
|
|
1901
|
-
</HStack>
|
|
1902
|
-
</property>
|
|
1903
|
-
</Tree>
|
|
1904
|
-
</VStack>
|
|
1905
|
-
`);
|
|
1906
|
-
const tree = yield createTreeDriver("tree");
|
|
1907
|
-
// Focus the tree and press Enter to expand first node
|
|
1908
|
-
yield tree.component.focus();
|
|
1909
|
-
yield tree.component.press("Enter");
|
|
1910
|
-
// Verify nodeDidExpand event fired
|
|
1911
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
1912
|
-
// Verify child is now visible
|
|
1913
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
1914
|
-
}));
|
|
1915
|
-
(0, fixtures_1.test)("only Enter key expands nodes - Space only selects", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1916
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1917
|
-
<VStack height="400px" var.selectionFired="false">
|
|
1918
|
-
<Tree testId="tree"
|
|
1919
|
-
dataFormat="hierarchy"
|
|
1920
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1921
|
-
onNodeDidExpand="node => testState = node"
|
|
1922
|
-
onSelectionDidChange="event => selectionFired = true">
|
|
1923
|
-
<property name="itemTemplate">
|
|
1924
|
-
<HStack testId="{$item.id}">
|
|
1925
|
-
<Text value="{$item.name}" />
|
|
1926
|
-
</HStack>
|
|
1927
|
-
</property>
|
|
1928
|
-
</Tree>
|
|
1929
|
-
</VStack>
|
|
1930
|
-
`);
|
|
1931
|
-
const tree = yield createTreeDriver("tree");
|
|
1932
|
-
// Focus the tree and press Space - should only trigger selection, not expansion
|
|
1933
|
-
yield tree.component.focus();
|
|
1934
|
-
yield tree.component.press("Space");
|
|
1935
|
-
// Wait a bit to ensure no expansion event fires
|
|
1936
|
-
yield tree.component.waitFor({ timeout: 1000 });
|
|
1937
|
-
// Verify no expansion event fired (testState should remain null)
|
|
1938
|
-
const expandState = yield testStateDriver.testState();
|
|
1939
|
-
(0, fixtures_1.expect)(expandState).toBeNull();
|
|
1940
|
-
// Verify children are still not visible
|
|
1941
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
1942
|
-
}));
|
|
1943
|
-
});
|
|
1944
|
-
fixtures_1.test.describe("nodeDidCollapse Event via Keyboard", () => {
|
|
1945
|
-
(0, fixtures_1.test)("fires when Left arrow key collapses an expanded node", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1946
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1947
|
-
<VStack height="400px">
|
|
1948
|
-
<Tree testId="tree"
|
|
1949
|
-
dataFormat="hierarchy"
|
|
1950
|
-
defaultExpanded="all"
|
|
1951
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1952
|
-
onNodeDidCollapse="node => testState = node">
|
|
1953
|
-
<property name="itemTemplate">
|
|
1954
|
-
<HStack testId="{$item.id}">
|
|
1955
|
-
<Text value="{$item.name}" />
|
|
1956
|
-
</HStack>
|
|
1957
|
-
</property>
|
|
1958
|
-
</Tree>
|
|
1959
|
-
</VStack>
|
|
1960
|
-
`);
|
|
1961
|
-
const tree = yield createTreeDriver("tree");
|
|
1962
|
-
// Verify child is initially visible (node starts expanded)
|
|
1963
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
1964
|
-
// Focus the tree and press Left arrow to collapse the first node
|
|
1965
|
-
yield tree.component.focus();
|
|
1966
|
-
yield tree.component.press("ArrowLeft");
|
|
1967
|
-
// Verify nodeDidCollapse fired with correct node
|
|
1968
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
1969
|
-
// Verify child is no longer visible
|
|
1970
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
1971
|
-
}));
|
|
1972
|
-
(0, fixtures_1.test)("fires when Left arrow navigates from child to parent and collapses parent", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
1973
|
-
const { testStateDriver } = yield initTestBed(`
|
|
1974
|
-
<VStack height="400px">
|
|
1975
|
-
<Tree testId="tree"
|
|
1976
|
-
dataFormat="hierarchy"
|
|
1977
|
-
defaultExpanded="all"
|
|
1978
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
1979
|
-
onNodeDidCollapse="node => testState = node">
|
|
1980
|
-
<property name="itemTemplate">
|
|
1981
|
-
<HStack testId="{$item.id}">
|
|
1982
|
-
<Text value="{$item.name}" />
|
|
1983
|
-
</HStack>
|
|
1984
|
-
</property>
|
|
1985
|
-
</Tree>
|
|
1986
|
-
</VStack>
|
|
1987
|
-
`);
|
|
1988
|
-
const tree = yield createTreeDriver("tree");
|
|
1989
|
-
// Verify child is initially visible (node starts expanded)
|
|
1990
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
1991
|
-
yield tree.component.focus();
|
|
1992
|
-
yield tree.component.press("ArrowDown"); // Move to child node
|
|
1993
|
-
yield tree.component.press("ArrowLeft"); // Navigate to parent
|
|
1994
|
-
// Then collapse the parent by pressing Left again
|
|
1995
|
-
yield tree.component.press("ArrowLeft");
|
|
1996
|
-
// Verify nodeDidCollapse fired with correct node
|
|
1997
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
1998
|
-
// Verify child is no longer visible
|
|
1999
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
2000
|
-
}));
|
|
2001
|
-
});
|
|
2002
|
-
fixtures_1.test.describe("Complex Keyboard Event Scenarios", () => {
|
|
2003
|
-
(0, fixtures_1.test)("fires multiple events during keyboard navigation session", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
2004
|
-
const { testStateDriver } = yield initTestBed(`
|
|
2005
|
-
<VStack height="400px" var.eventCount="0" var.lastEvent="">
|
|
2006
|
-
<Tree testId="tree"
|
|
2007
|
-
dataFormat="hierarchy"
|
|
2008
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2009
|
-
onSelectionDidChange="event => { eventCount++; lastEvent = 'selection:' + event.newNode?.id; testState = { count: eventCount, last: lastEvent }; }"
|
|
2010
|
-
onNodeDidExpand="node => { eventCount++; lastEvent = 'expand:' + node.id; testState = { count: eventCount, last: lastEvent }; }"
|
|
2011
|
-
onNodeDidCollapse="node => { eventCount++; lastEvent = 'collapse:' + node.id; testState = { count: eventCount, last: lastEvent }; }">
|
|
2012
|
-
<property name="itemTemplate">
|
|
2013
|
-
<HStack testId="{$item.id}">
|
|
2014
|
-
<Text value="{$item.name}" />
|
|
2015
|
-
</HStack>
|
|
2016
|
-
</property>
|
|
2017
|
-
</Tree>
|
|
2018
|
-
</VStack>
|
|
2019
|
-
`);
|
|
2020
|
-
const tree = yield createTreeDriver("tree");
|
|
2021
|
-
// Simple keyboard interaction sequence
|
|
2022
|
-
yield tree.component.focus();
|
|
2023
|
-
// 1. Select and expand first node (Enter does both)
|
|
2024
|
-
yield tree.component.press("Enter");
|
|
2025
|
-
// 2. Navigate to child and select it
|
|
2026
|
-
yield tree.component.press("ArrowDown");
|
|
2027
|
-
yield tree.component.press("Space"); // Select child (Space only selects)
|
|
2028
|
-
// Verify we have multiple events (using poll for async events)
|
|
2029
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.count)).toBe(2);
|
|
2030
|
-
const result = yield testStateDriver.testState();
|
|
2031
|
-
// Check that we captured events (last event should be selection)
|
|
2032
|
-
(0, fixtures_1.expect)(result.last).toMatch(/selection:\d+/);
|
|
2033
|
-
}));
|
|
2034
|
-
(0, fixtures_1.test)("handles rapid keyboard interactions without missing events", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
2035
|
-
const { testStateDriver } = yield initTestBed(`
|
|
2036
|
-
<VStack height="400px" var.expandCount="0">
|
|
2037
|
-
<Tree testId="tree"
|
|
2038
|
-
dataFormat="hierarchy"
|
|
2039
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2040
|
-
onNodeDidExpand="node => { expandCount++; testState = expandCount; }">
|
|
2041
|
-
<property name="itemTemplate">
|
|
2042
|
-
<HStack testId="{$item.id}">
|
|
2043
|
-
<Text value="{$item.name}" />
|
|
2044
|
-
</HStack>
|
|
2045
|
-
</property>
|
|
2046
|
-
</Tree>
|
|
2047
|
-
</VStack>
|
|
2048
|
-
`);
|
|
2049
|
-
const tree = yield createTreeDriver("tree");
|
|
2050
|
-
yield tree.component.focus();
|
|
2051
|
-
// Rapid expand/collapse sequence
|
|
2052
|
-
yield tree.component.press("ArrowRight"); // Expand
|
|
2053
|
-
yield tree.component.press("ArrowLeft"); // Collapse
|
|
2054
|
-
yield tree.component.press("ArrowRight"); // Expand again
|
|
2055
|
-
yield tree.component.press("ArrowLeft"); // Collapse again
|
|
2056
|
-
yield tree.component.press("ArrowRight"); // Expand third time
|
|
2057
|
-
// Verify all expansion events were captured
|
|
2058
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState()).toBe(3);
|
|
2059
|
-
}));
|
|
2060
|
-
});
|
|
2061
|
-
});
|
|
2062
|
-
// =============================================================================
|
|
2063
|
-
// API EVENT TESTS
|
|
2064
|
-
// =============================================================================
|
|
2065
|
-
fixtures_1.test.describe("API Events", () => {
|
|
2066
|
-
fixtures_1.test.describe("nodeDidExpand Event via API", () => {
|
|
2067
|
-
(0, fixtures_1.test)("fires when expandNode() API method is called", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2068
|
-
const { testStateDriver } = yield initTestBed(`
|
|
2069
|
-
<Fragment>
|
|
2070
|
-
<VStack height="400px">
|
|
2071
|
-
<Tree id="treeApi" testId="tree"
|
|
2072
|
-
dataFormat="hierarchy"
|
|
2073
|
-
defaultExpanded="none"
|
|
2074
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2075
|
-
onNodeDidExpand="node => testState = node">
|
|
2076
|
-
<property name="itemTemplate">
|
|
2077
|
-
<HStack testId="{$item.id}">
|
|
2078
|
-
<Text value="{$item.name}" />
|
|
2079
|
-
</HStack>
|
|
2080
|
-
</property>
|
|
2081
|
-
</Tree>
|
|
2082
|
-
</VStack>
|
|
2083
|
-
<Button testId="expand-btn" label="Expand Node 1" onClick="
|
|
2084
|
-
treeApi.expandNode(1);
|
|
2085
|
-
" />
|
|
2086
|
-
</Fragment>
|
|
2087
|
-
`);
|
|
2088
|
-
const tree = yield createTreeDriver("tree");
|
|
2089
|
-
const expandButton = yield createButtonDriver("expand-btn");
|
|
2090
|
-
// Initially, child should not be visible
|
|
2091
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
2092
|
-
// Trigger API expansion
|
|
2093
|
-
yield expandButton.click();
|
|
2094
|
-
// Verify nodeDidExpand event fired
|
|
2095
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
2096
|
-
// Verify child is now visible
|
|
2097
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
2098
|
-
}));
|
|
2099
|
-
(0, fixtures_1.test)("fires for expandAll() API method", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2100
|
-
yield initTestBed(`
|
|
2101
|
-
<Fragment>
|
|
2102
|
-
<VStack height="400px" var.expandEvents="[]">
|
|
2103
|
-
<Text testId="eventsText">{expandEvents}</Text>
|
|
2104
|
-
<Tree id="treeApi" testId="tree"
|
|
2105
|
-
dataFormat="hierarchy"
|
|
2106
|
-
defaultExpanded="none"
|
|
2107
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2108
|
-
onNodeDidExpand="node => {expandEvents.push(node.id)}"
|
|
2109
|
-
>
|
|
2110
|
-
<property name="itemTemplate">
|
|
2111
|
-
<HStack testId="{$item.id}">
|
|
2112
|
-
<Text value="{$item.name}" />
|
|
2113
|
-
</HStack>
|
|
2114
|
-
</property>
|
|
2115
|
-
</Tree>
|
|
2116
|
-
</VStack>
|
|
2117
|
-
<Button testId="expand-all-btn" label="Expand All" onClick="
|
|
2118
|
-
treeApi.expandAll();
|
|
2119
|
-
" />
|
|
2120
|
-
</Fragment>
|
|
2121
|
-
`);
|
|
2122
|
-
const tree = yield createTreeDriver("tree");
|
|
2123
|
-
const expandAllButton = yield createButtonDriver("expand-all-btn");
|
|
2124
|
-
// Trigger API expand all
|
|
2125
|
-
yield expandAllButton.click();
|
|
2126
|
-
const eventsText = page.getByTestId("eventsText");
|
|
2127
|
-
// expandAll() does not fire individual nodeDidExpand events
|
|
2128
|
-
// This is the correct behavior - mass operations should not fire individual events
|
|
2129
|
-
yield (0, fixtures_1.expect)(eventsText).toHaveText("[]");
|
|
2130
|
-
// But verify the visual result is correct - all nodes should be visible
|
|
2131
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
2132
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4")).toBeVisible();
|
|
2133
|
-
}));
|
|
2134
|
-
(0, fixtures_1.test)("fires for expandToLevel() API method", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2135
|
-
yield initTestBed(`
|
|
2136
|
-
<Fragment>
|
|
2137
|
-
<VStack height="400px" var.expandEvents="[]">
|
|
2138
|
-
<Text testId="eventsText">{expandEvents}</Text>
|
|
2139
|
-
<Tree id="treeApi" testId="tree"
|
|
2140
|
-
dataFormat="hierarchy"
|
|
2141
|
-
defaultExpanded="none"
|
|
2142
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2143
|
-
onNodeDidExpand="node => {expandEvents.push(node.id)}"
|
|
2144
|
-
>
|
|
2145
|
-
<property name="itemTemplate">
|
|
2146
|
-
<HStack testId="{$item.id}">
|
|
2147
|
-
<Text value="{$item.name}" />
|
|
2148
|
-
</HStack>
|
|
2149
|
-
</property>
|
|
2150
|
-
</Tree>
|
|
2151
|
-
</VStack>
|
|
2152
|
-
<Button testId="expand-level-btn" label="Expand to Level 1" onClick="
|
|
2153
|
-
treeApi.expandToLevel(1);
|
|
2154
|
-
" />
|
|
2155
|
-
</Fragment>
|
|
2156
|
-
`);
|
|
2157
|
-
const tree = yield createTreeDriver("tree");
|
|
2158
|
-
const expandLevelButton = yield createButtonDriver("expand-level-btn");
|
|
2159
|
-
// Trigger API expand to level
|
|
2160
|
-
yield expandLevelButton.click();
|
|
2161
|
-
const eventsText = page.getByTestId("eventsText");
|
|
2162
|
-
// expandToLevel() does not fire individual nodeDidExpand events
|
|
2163
|
-
// This is the correct behavior - mass operations should not fire individual events
|
|
2164
|
-
yield (0, fixtures_1.expect)(eventsText).toHaveText("[]");
|
|
2165
|
-
// But verify the visual result is correct - level 1 nodes should be visible
|
|
2166
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
2167
|
-
}));
|
|
2168
|
-
});
|
|
2169
|
-
fixtures_1.test.describe("nodeDidCollapse Event via API", () => {
|
|
2170
|
-
(0, fixtures_1.test)("fires when collapseNode() API method is called", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2171
|
-
const { testStateDriver } = yield initTestBed(`
|
|
2172
|
-
<Fragment>
|
|
2173
|
-
<VStack height="400px">
|
|
2174
|
-
<Tree id="treeApi" testId="tree"
|
|
2175
|
-
dataFormat="hierarchy"
|
|
2176
|
-
defaultExpanded="all"
|
|
2177
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2178
|
-
onNodeDidCollapse="node => testState = node">
|
|
2179
|
-
<property name="itemTemplate">
|
|
2180
|
-
<HStack testId="{$item.id}">
|
|
2181
|
-
<Text value="{$item.name}" />
|
|
2182
|
-
</HStack>
|
|
2183
|
-
</property>
|
|
2184
|
-
</Tree>
|
|
2185
|
-
</VStack>
|
|
2186
|
-
<Button testId="collapse-btn" label="Collapse Node 1" onClick="
|
|
2187
|
-
treeApi.collapseNode(1);
|
|
2188
|
-
" />
|
|
2189
|
-
</Fragment>
|
|
2190
|
-
`);
|
|
2191
|
-
const tree = yield createTreeDriver("tree");
|
|
2192
|
-
const collapseButton = yield createButtonDriver("collapse-btn");
|
|
2193
|
-
// Initially, child should be visible (starts expanded)
|
|
2194
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
2195
|
-
// Trigger API collapse
|
|
2196
|
-
yield collapseButton.click();
|
|
2197
|
-
// Verify nodeDidCollapse event fired
|
|
2198
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState().then((s) => s === null || s === void 0 ? void 0 : s.id)).toBe(1);
|
|
2199
|
-
// Verify child is no longer visible
|
|
2200
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
2201
|
-
}));
|
|
2202
|
-
(0, fixtures_1.test)("fires for collapseAll() API method", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2203
|
-
yield initTestBed(`
|
|
2204
|
-
<Fragment>
|
|
2205
|
-
<VStack height="400px" var.collapseEvents="[]">
|
|
2206
|
-
<Text testId="eventsText">{collapseEvents}</Text>
|
|
2207
|
-
<Tree id="treeApi" testId="tree"
|
|
2208
|
-
dataFormat="hierarchy"
|
|
2209
|
-
defaultExpanded="all"
|
|
2210
|
-
data='{${JSON.stringify(testData_1.hierarchyTreeData)}}'
|
|
2211
|
-
onNodeDidCollapse="node => {collapseEvents.push(node.id)}"
|
|
2212
|
-
>
|
|
2213
|
-
<property name="itemTemplate">
|
|
2214
|
-
<HStack testId="{$item.id}">
|
|
2215
|
-
<Text value="{$item.name}" />
|
|
2216
|
-
</HStack>
|
|
2217
|
-
</property>
|
|
2218
|
-
</Tree>
|
|
2219
|
-
</VStack>
|
|
2220
|
-
<Button testId="collapse-all-btn" label="Collapse All" onClick="
|
|
2221
|
-
treeApi.collapseAll();
|
|
2222
|
-
" />
|
|
2223
|
-
</Fragment>
|
|
2224
|
-
`);
|
|
2225
|
-
const tree = yield createTreeDriver("tree");
|
|
2226
|
-
const collapseAllButton = yield createButtonDriver("collapse-all-btn");
|
|
2227
|
-
// Initially, children should be visible (starts expanded)
|
|
2228
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).toBeVisible();
|
|
2229
|
-
// Trigger API collapse all
|
|
2230
|
-
yield collapseAllButton.click();
|
|
2231
|
-
const eventsText = page.getByTestId("eventsText");
|
|
2232
|
-
// collapseAll() does not fire individual nodeDidCollapse events
|
|
2233
|
-
// This is the correct behavior - mass operations should not fire individual events
|
|
2234
|
-
yield (0, fixtures_1.expect)(eventsText).toHaveText("[]");
|
|
2235
|
-
// But verify the visual result is correct - children should no longer be visible
|
|
2236
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2")).not.toBeVisible();
|
|
2237
|
-
}));
|
|
2238
|
-
});
|
|
2239
|
-
fixtures_1.test.describe("selectionDidChange Event via API", () => {
|
|
2240
|
-
(0, fixtures_1.test)("fires when selectNode() API method is called", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2241
|
-
const { testStateDriver } = yield initTestBed(`
|
|
2242
|
-
<Fragment>
|
|
2243
|
-
<VStack height="400px">
|
|
2244
|
-
<Tree id="treeApi" testId="tree"
|
|
2245
|
-
dataFormat="flat"
|
|
2246
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
2247
|
-
onSelectionDidChange="event => testState = event">
|
|
2248
|
-
<property name="itemTemplate">
|
|
2249
|
-
<HStack testId="{$item.id}">
|
|
2250
|
-
<Text value="{$item.name}" />
|
|
2251
|
-
</HStack>
|
|
2252
|
-
</property>
|
|
2253
|
-
</Tree>
|
|
2254
|
-
</VStack>
|
|
2255
|
-
<Button testId="select-btn" label="Select Node 2" onClick="
|
|
2256
|
-
treeApi.selectNode(2);
|
|
2257
|
-
" />
|
|
2258
|
-
</Fragment>
|
|
2259
|
-
`);
|
|
2260
|
-
const tree = yield createTreeDriver("tree");
|
|
2261
|
-
const selectButton = yield createButtonDriver("select-btn");
|
|
2262
|
-
// Trigger API selection
|
|
2263
|
-
yield selectButton.click();
|
|
2264
|
-
// Verify selectionDidChange event fired
|
|
2265
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState()).toBeDefined();
|
|
2266
|
-
const event = yield testStateDriver.testState();
|
|
2267
|
-
(0, fixtures_1.expect)(event.newNode).toBeDefined();
|
|
2268
|
-
(0, fixtures_1.expect)(event.newNode.id).toBe(2);
|
|
2269
|
-
(0, fixtures_1.expect)(event.newNode.displayName).toBe("Child Item 1.1");
|
|
2270
|
-
(0, fixtures_1.expect)(event.previousNode).toBeNull();
|
|
2271
|
-
}));
|
|
2272
|
-
(0, fixtures_1.test)("fires with previous node when changing selection via API", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2273
|
-
yield initTestBed(`
|
|
2274
|
-
<Fragment>
|
|
2275
|
-
<VStack height="400px" var.selectionEvents="{[]}">
|
|
2276
|
-
<Text testId="eventsText">{JSON.stringify(selectionEvents)}</Text>
|
|
2277
|
-
<Tree id="treeApi" testId="tree"
|
|
2278
|
-
dataFormat="flat"
|
|
2279
|
-
defaultExpanded="all"
|
|
2280
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
2281
|
-
onSelectionDidChange="event => {selectionEvents.push({prev: event.previousNode?.id || null, new: event.newNode?.id || null});}"
|
|
2282
|
-
>
|
|
2283
|
-
<property name="itemTemplate">
|
|
2284
|
-
<HStack testId="{$item.id}">
|
|
2285
|
-
<Text value="{$item.name}" />
|
|
2286
|
-
</HStack>
|
|
2287
|
-
</property>
|
|
2288
|
-
</Tree>
|
|
2289
|
-
</VStack>
|
|
2290
|
-
<Button testId="select-first-btn" label="Select First" onClick="treeApi.selectNode(1);" />
|
|
2291
|
-
<Button testId="select-second-btn" label="Select Second" onClick="treeApi.selectNode(2);" />
|
|
2292
|
-
</Fragment>
|
|
2293
|
-
`);
|
|
2294
|
-
const tree = yield createTreeDriver("tree");
|
|
2295
|
-
const selectFirstButton = yield createButtonDriver("select-first-btn");
|
|
2296
|
-
const selectSecondButton = yield createButtonDriver("select-second-btn");
|
|
2297
|
-
// First selection
|
|
2298
|
-
yield selectFirstButton.click();
|
|
2299
|
-
// Second selection
|
|
2300
|
-
yield selectSecondButton.click();
|
|
2301
|
-
const eventsText = page.getByTestId("eventsText");
|
|
2302
|
-
// Verify we have both selection events with correct previous/new node IDs
|
|
2303
|
-
yield (0, fixtures_1.expect)(eventsText).toHaveText('[{"prev":null,"new":1},{"prev":1,"new":2}]');
|
|
2304
|
-
}));
|
|
2305
|
-
(0, fixtures_1.test)("fires when clearSelection() API method is called", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, createButtonDriver, }) {
|
|
2306
|
-
const { testStateDriver } = yield initTestBed(`
|
|
2307
|
-
<Fragment>
|
|
2308
|
-
<VStack height="400px">
|
|
2309
|
-
<Tree id="treeApi" testId="tree"
|
|
2310
|
-
dataFormat="flat"
|
|
2311
|
-
selectedValue="1"
|
|
2312
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'
|
|
2313
|
-
onSelectionDidChange="event => testState = event">
|
|
2314
|
-
<property name="itemTemplate">
|
|
2315
|
-
<HStack testId="{$item.id}">
|
|
2316
|
-
<Text value="{$item.name}" />
|
|
2317
|
-
</HStack>
|
|
2318
|
-
</property>
|
|
2319
|
-
</Tree>
|
|
2320
|
-
</VStack>
|
|
2321
|
-
<Button testId="clear-btn" label="Clear Selection" onClick="
|
|
2322
|
-
treeApi.clearSelection();
|
|
2323
|
-
" />
|
|
2324
|
-
</Fragment>
|
|
2325
|
-
`);
|
|
2326
|
-
const tree = yield createTreeDriver("tree");
|
|
2327
|
-
const clearButton = yield createButtonDriver("clear-btn");
|
|
2328
|
-
// Trigger API clear selection
|
|
2329
|
-
yield clearButton.click();
|
|
2330
|
-
// Verify selectionDidChange event fired with null newNode
|
|
2331
|
-
yield fixtures_1.expect.poll(() => testStateDriver.testState()).toBeDefined();
|
|
2332
|
-
const event = yield testStateDriver.testState();
|
|
2333
|
-
(0, fixtures_1.expect)(event.newNode).toBeNull();
|
|
2334
|
-
(0, fixtures_1.expect)(event.previousNode).toBeDefined();
|
|
2335
|
-
(0, fixtures_1.expect)(event.previousNode.id).toBe(1);
|
|
2336
|
-
}));
|
|
2337
|
-
});
|
|
2338
|
-
});
|
|
2339
|
-
});
|
|
2340
|
-
// =============================================================================
|
|
2341
|
-
// ACCESSIBILITY TESTS
|
|
2342
|
-
// =============================================================================
|
|
2343
|
-
fixtures_1.test.describe("Accessibility", () => {
|
|
2344
|
-
(0, fixtures_1.test)("has proper ARIA attributes", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2345
|
-
yield initTestBed(`
|
|
2346
|
-
<VStack height="400px">
|
|
2347
|
-
<Tree testId="tree"
|
|
2348
|
-
dataFormat="flat"
|
|
2349
|
-
defaultExpanded="all"
|
|
2350
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
2351
|
-
<property name="itemTemplate">
|
|
2352
|
-
<HStack testId="{$item.id}:aria" verticalAlignment="center">
|
|
2353
|
-
<Text value="{$item.name}" />
|
|
2354
|
-
</HStack>
|
|
2355
|
-
</property>
|
|
2356
|
-
</Tree>
|
|
2357
|
-
</VStack>
|
|
2358
|
-
`);
|
|
2359
|
-
const tree = yield createTreeDriver("tree");
|
|
2360
|
-
// Test main tree container ARIA attributes
|
|
2361
|
-
yield (0, fixtures_1.expect)(tree.component).toHaveAttribute("role", "tree");
|
|
2362
|
-
yield (0, fixtures_1.expect)(tree.component).toHaveAttribute("aria-label", "Tree navigation");
|
|
2363
|
-
yield (0, fixtures_1.expect)(tree.component).toHaveAttribute("aria-multiselectable", "false");
|
|
2364
|
-
// Test tree items have proper ARIA attributes
|
|
2365
|
-
// Find treeitems by their role attribute
|
|
2366
|
-
const treeItems = tree.component.locator('[role="treeitem"]');
|
|
2367
|
-
// Test first tree item (should be expanded due to defaultExpanded="all")
|
|
2368
|
-
const firstTreeItem = treeItems.first();
|
|
2369
|
-
yield (0, fixtures_1.expect)(firstTreeItem).toHaveAttribute("role", "treeitem");
|
|
2370
|
-
yield (0, fixtures_1.expect)(firstTreeItem).toHaveAttribute("aria-level", "1");
|
|
2371
|
-
yield (0, fixtures_1.expect)(firstTreeItem).toHaveAttribute("aria-expanded", "true");
|
|
2372
|
-
yield (0, fixtures_1.expect)(firstTreeItem).toHaveAttribute("aria-selected", "false");
|
|
2373
|
-
yield (0, fixtures_1.expect)(firstTreeItem).toHaveAttribute("aria-label", "Root Item 1");
|
|
2374
|
-
// Test that we have the expected number of tree items (4 total in flatTreeData)
|
|
2375
|
-
yield (0, fixtures_1.expect)(treeItems).toHaveCount(4);
|
|
2376
|
-
// Test second tree item (Child Item 1.1)
|
|
2377
|
-
const secondTreeItem = treeItems.nth(1);
|
|
2378
|
-
yield (0, fixtures_1.expect)(secondTreeItem).toHaveAttribute("aria-level", "2");
|
|
2379
|
-
yield (0, fixtures_1.expect)(secondTreeItem).toHaveAttribute("aria-label", "Child Item 1.1");
|
|
2380
|
-
// Test third tree item (Grandchild Item 1.1.1)
|
|
2381
|
-
const thirdTreeItem = treeItems.nth(2);
|
|
2382
|
-
yield (0, fixtures_1.expect)(thirdTreeItem).toHaveAttribute("aria-level", "3");
|
|
2383
|
-
yield (0, fixtures_1.expect)(thirdTreeItem).toHaveAttribute("aria-label", "Grandchild Item 1.1.1");
|
|
2384
|
-
// Test fourth tree item (Child Item 1.2)
|
|
2385
|
-
const fourthTreeItem = treeItems.nth(3);
|
|
2386
|
-
yield (0, fixtures_1.expect)(fourthTreeItem).toHaveAttribute("aria-level", "2");
|
|
2387
|
-
yield (0, fixtures_1.expect)(fourthTreeItem).toHaveAttribute("aria-label", "Child Item 1.2");
|
|
2388
|
-
}));
|
|
2389
|
-
(0, fixtures_1.test)("supports keyboard navigation", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2390
|
-
yield initTestBed(`
|
|
2391
|
-
<VStack height="400px">
|
|
2392
|
-
<Tree testId="tree"
|
|
2393
|
-
dataFormat="flat"
|
|
2394
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
2395
|
-
<property name="itemTemplate">
|
|
2396
|
-
<HStack testId="{$item.id}:keyboard" verticalAlignment="center">
|
|
2397
|
-
<Text value="{$item.name}" />
|
|
2398
|
-
</HStack>
|
|
2399
|
-
</property>
|
|
2400
|
-
</Tree>
|
|
2401
|
-
</VStack>
|
|
2402
|
-
`);
|
|
2403
|
-
const tree = yield createTreeDriver("tree");
|
|
2404
|
-
// Focus the tree
|
|
2405
|
-
yield tree.component.focus();
|
|
2406
|
-
// Test Arrow Down navigation
|
|
2407
|
-
yield tree.component.press("ArrowDown");
|
|
2408
|
-
// First item should be focused after initial focus + ArrowDown
|
|
2409
|
-
// Test Arrow Up navigation
|
|
2410
|
-
yield tree.component.press("ArrowUp");
|
|
2411
|
-
// Should stay at first item (can't go up from first)
|
|
2412
|
-
// Navigate down to second item
|
|
2413
|
-
yield tree.component.press("ArrowDown");
|
|
2414
|
-
// Test Enter for selection/expansion
|
|
2415
|
-
yield tree.component.press("Enter");
|
|
2416
|
-
// Test Arrow Right for expansion (if has children)
|
|
2417
|
-
yield tree.component.press("ArrowRight");
|
|
2418
|
-
// Test Arrow Left for collapse/parent navigation
|
|
2419
|
-
yield tree.component.press("ArrowLeft");
|
|
2420
|
-
// Test Home key
|
|
2421
|
-
yield tree.component.press("Home");
|
|
2422
|
-
// Test End key
|
|
2423
|
-
yield tree.component.press("End");
|
|
2424
|
-
// Test Space for selection
|
|
2425
|
-
yield tree.component.press(" ");
|
|
2426
|
-
// Verify tree is still visible and functional after keyboard interactions
|
|
2427
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:keyboard")).toBeVisible();
|
|
2428
|
-
}));
|
|
2429
|
-
(0, fixtures_1.test)("supports itemClickExpands behavior", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2430
|
-
yield initTestBed(`
|
|
2431
|
-
<VStack height="400px">
|
|
2432
|
-
<Tree testId="tree"
|
|
2433
|
-
dataFormat="flat"
|
|
2434
|
-
itemClickExpands="true"
|
|
2435
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
2436
|
-
<property name="itemTemplate">
|
|
2437
|
-
<HStack testId="{$item.id}:expand-click" verticalAlignment="center">
|
|
2438
|
-
<Text value="{$item.name}" />
|
|
2439
|
-
</HStack>
|
|
2440
|
-
</property>
|
|
2441
|
-
</Tree>
|
|
2442
|
-
</VStack>
|
|
2443
|
-
`);
|
|
2444
|
-
const tree = yield createTreeDriver("tree");
|
|
2445
|
-
// Initially, only root item should be visible (tree starts collapsed)
|
|
2446
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:expand-click")).toBeVisible();
|
|
2447
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:expand-click")).not.toBeVisible();
|
|
2448
|
-
// Click on the root item (not the expand/collapse icon) to expand it
|
|
2449
|
-
yield tree.getByTestId("1:expand-click").click();
|
|
2450
|
-
// After clicking, children should be visible
|
|
2451
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:expand-click")).toBeVisible();
|
|
2452
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("3:expand-click")).toBeVisible();
|
|
2453
|
-
// Click on child item that has its own children
|
|
2454
|
-
yield tree.getByTestId("2:expand-click").click();
|
|
2455
|
-
// Grandchild should become visible
|
|
2456
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:expand-click")).toBeVisible();
|
|
2457
|
-
// Click again to collapse
|
|
2458
|
-
yield tree.getByTestId("2:expand-click").click();
|
|
2459
|
-
// Grandchild should be hidden
|
|
2460
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("4:expand-click")).not.toBeVisible();
|
|
2461
|
-
}));
|
|
2462
|
-
(0, fixtures_1.test)("works with screen readers", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2463
|
-
yield initTestBed(`
|
|
2464
|
-
<VStack height="400px">
|
|
2465
|
-
<Tree testId="tree"
|
|
2466
|
-
dataFormat="flat"
|
|
2467
|
-
defaultExpanded="all"
|
|
2468
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
2469
|
-
<property name="itemTemplate">
|
|
2470
|
-
<HStack testId="{$item.id}:screen-reader" verticalAlignment="center">
|
|
2471
|
-
<Text value="{$item.name}" />
|
|
2472
|
-
</HStack>
|
|
2473
|
-
</property>
|
|
2474
|
-
</Tree>
|
|
2475
|
-
</VStack>
|
|
2476
|
-
`);
|
|
2477
|
-
const tree = yield createTreeDriver("tree");
|
|
2478
|
-
// Test semantic structure that screen readers depend on
|
|
2479
|
-
yield (0, fixtures_1.expect)(tree.component).toHaveAttribute("role", "tree");
|
|
2480
|
-
// Verify all tree items have proper semantic markup
|
|
2481
|
-
const treeItems = tree.component.locator('[role="treeitem"]');
|
|
2482
|
-
yield (0, fixtures_1.expect)(treeItems).toHaveCount(4);
|
|
2483
|
-
// Test each item has required accessibility information
|
|
2484
|
-
for (let i = 0; i < 4; i++) {
|
|
2485
|
-
const item = treeItems.nth(i);
|
|
2486
|
-
// Each item must have a level for screen reader navigation
|
|
2487
|
-
yield (0, fixtures_1.expect)(item).toHaveAttribute("aria-level");
|
|
2488
|
-
// Each item must have a label for screen reader announcement
|
|
2489
|
-
yield (0, fixtures_1.expect)(item).toHaveAttribute("aria-label");
|
|
2490
|
-
// Each item must have selection state
|
|
2491
|
-
yield (0, fixtures_1.expect)(item).toHaveAttribute("aria-selected");
|
|
2492
|
-
}
|
|
2493
|
-
// Test hierarchical relationships are properly communicated
|
|
2494
|
-
const rootItem = treeItems.first();
|
|
2495
|
-
yield (0, fixtures_1.expect)(rootItem).toHaveAttribute("aria-level", "1");
|
|
2496
|
-
yield (0, fixtures_1.expect)(rootItem).toHaveAttribute("aria-expanded", "true");
|
|
2497
|
-
// Test child items have correct level hierarchy
|
|
2498
|
-
const childItem = treeItems.nth(1);
|
|
2499
|
-
yield (0, fixtures_1.expect)(childItem).toHaveAttribute("aria-level", "2");
|
|
2500
|
-
// Test grandchild has deeper level
|
|
2501
|
-
const grandchildItem = treeItems.nth(2);
|
|
2502
|
-
yield (0, fixtures_1.expect)(grandchildItem).toHaveAttribute("aria-level", "3");
|
|
2503
|
-
// Test that all items have selection state (even if not selected)
|
|
2504
|
-
const allItems = tree.component.locator('[aria-selected="false"]');
|
|
2505
|
-
yield (0, fixtures_1.expect)(allItems).toHaveCount(4); // All items should be unselected initially
|
|
2506
|
-
// Test expansion states are properly communicated
|
|
2507
|
-
const expandedItems = tree.component.locator('[aria-expanded="true"]');
|
|
2508
|
-
yield (0, fixtures_1.expect)(expandedItems).toHaveCount(2); // Root and Child Item 1.1 (which has a grandchild)
|
|
2509
|
-
// Test that tree is focusable for keyboard navigation
|
|
2510
|
-
yield (0, fixtures_1.expect)(tree.component).toHaveAttribute("tabindex", "0");
|
|
2511
|
-
// Verify semantic structure is maintained for screen reader navigation
|
|
2512
|
-
yield (0, fixtures_1.expect)(tree.component).toHaveAttribute("role", "tree");
|
|
2513
|
-
yield (0, fixtures_1.expect)(treeItems.first()).toHaveAttribute("role", "treeitem");
|
|
2514
|
-
// Test that all required accessibility information is present
|
|
2515
|
-
// This ensures screen readers can properly announce tree structure
|
|
2516
|
-
const firstItem = treeItems.first();
|
|
2517
|
-
yield (0, fixtures_1.expect)(firstItem).toHaveAttribute("aria-level");
|
|
2518
|
-
yield (0, fixtures_1.expect)(firstItem).toHaveAttribute("aria-label");
|
|
2519
|
-
yield (0, fixtures_1.expect)(firstItem).toHaveAttribute("aria-expanded");
|
|
2520
|
-
yield (0, fixtures_1.expect)(firstItem).toHaveAttribute("aria-selected");
|
|
2521
|
-
}));
|
|
2522
|
-
});
|
|
2523
|
-
// =============================================================================
|
|
2524
|
-
// PERFORMANCE TESTS
|
|
2525
|
-
// =============================================================================
|
|
2526
|
-
fixtures_1.test.describe("Performance", () => {
|
|
2527
|
-
(0, fixtures_1.test)("handles large datasets efficiently", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2528
|
-
// Generate a large dataset with 1000+ items in a hierarchical structure
|
|
2529
|
-
const generateLargeDataset = (numItems = 1000) => {
|
|
2530
|
-
const data = [];
|
|
2531
|
-
let id = 1;
|
|
2532
|
-
// Create root items (10% of total)
|
|
2533
|
-
const numRoots = Math.ceil(numItems * 0.1);
|
|
2534
|
-
for (let i = 0; i < numRoots; i++) {
|
|
2535
|
-
data.push({
|
|
2536
|
-
id: id++,
|
|
2537
|
-
name: `Root Item ${i + 1}`,
|
|
2538
|
-
parentId: null,
|
|
2539
|
-
});
|
|
2540
|
-
}
|
|
2541
|
-
// Create child items distributed under roots
|
|
2542
|
-
const itemsPerRoot = Math.floor((numItems - numRoots) / numRoots);
|
|
2543
|
-
for (let rootIndex = 0; rootIndex < numRoots; rootIndex++) {
|
|
2544
|
-
const rootId = rootIndex + 1;
|
|
2545
|
-
for (let j = 0; j < itemsPerRoot && id <= numItems; j++) {
|
|
2546
|
-
data.push({
|
|
2547
|
-
id: id++,
|
|
2548
|
-
name: `Child Item ${rootId}.${j + 1}`,
|
|
2549
|
-
parentId: rootId,
|
|
2550
|
-
});
|
|
2551
|
-
}
|
|
2552
|
-
}
|
|
2553
|
-
return data;
|
|
2554
|
-
};
|
|
2555
|
-
const largeDataset = generateLargeDataset(1000);
|
|
2556
|
-
const startTime = performance.now();
|
|
2557
|
-
yield initTestBed(`
|
|
2558
|
-
<VStack height="400px">
|
|
2559
|
-
<Tree testId="tree"
|
|
2560
|
-
dataFormat="flat"
|
|
2561
|
-
data='{${JSON.stringify(largeDataset)}}'>
|
|
2562
|
-
<property name="itemTemplate">
|
|
2563
|
-
<HStack testId="{$item.id}:perf" verticalAlignment="center">
|
|
2564
|
-
<Text value="{$item.name}" />
|
|
2565
|
-
</HStack>
|
|
2566
|
-
</property>
|
|
2567
|
-
</Tree>
|
|
2568
|
-
</VStack>
|
|
2569
|
-
`);
|
|
2570
|
-
const tree = yield createTreeDriver("tree");
|
|
2571
|
-
// Verify tree renders
|
|
2572
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2573
|
-
const renderTime = performance.now() - startTime;
|
|
2574
|
-
// Should render large dataset within reasonable time (< 5 seconds)
|
|
2575
|
-
(0, fixtures_1.expect)(renderTime).toBeLessThan(5000);
|
|
2576
|
-
// Test that only root items are initially visible (virtualization working)
|
|
2577
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:perf")).toBeVisible();
|
|
2578
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("2:perf")).toBeVisible();
|
|
2579
|
-
// Verify scrolling performance - scroll to end of visible items
|
|
2580
|
-
const scrollStartTime = performance.now();
|
|
2581
|
-
yield tree.component.press("End"); // Scroll to last visible item
|
|
2582
|
-
const scrollTime = performance.now() - scrollStartTime;
|
|
2583
|
-
// Scrolling should be fast (< 1 second)
|
|
2584
|
-
(0, fixtures_1.expect)(scrollTime).toBeLessThan(1000);
|
|
2585
|
-
// Test expansion performance
|
|
2586
|
-
const expandStartTime = performance.now();
|
|
2587
|
-
yield tree.getByTestId("1:perf").click(); // Expand first root item
|
|
2588
|
-
const expandTime = performance.now() - expandStartTime;
|
|
2589
|
-
// Expansion should be fast (< 500ms)
|
|
2590
|
-
(0, fixtures_1.expect)(expandTime).toBeLessThan(500);
|
|
2591
|
-
}));
|
|
2592
|
-
(0, fixtures_1.test)("maintains smooth scrolling with virtualization", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
2593
|
-
// Create a dataset specifically for scroll testing
|
|
2594
|
-
const scrollTestData = [];
|
|
2595
|
-
for (let i = 1; i <= 500; i++) {
|
|
2596
|
-
scrollTestData.push({
|
|
2597
|
-
id: i,
|
|
2598
|
-
name: `Scroll Item ${i}`,
|
|
2599
|
-
parentId: null,
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2602
|
-
yield initTestBed(`
|
|
2603
|
-
<VStack height="300px">
|
|
2604
|
-
<Tree testId="scroll-tree"
|
|
2605
|
-
dataFormat="flat"
|
|
2606
|
-
data='{${JSON.stringify(scrollTestData)}}'>
|
|
2607
|
-
<property name="itemTemplate">
|
|
2608
|
-
<HStack testId="{$item.id}:scroll">
|
|
2609
|
-
<Text value="{$item.name}" />
|
|
2610
|
-
</HStack>
|
|
2611
|
-
</property>
|
|
2612
|
-
</Tree>
|
|
2613
|
-
</VStack>
|
|
2614
|
-
`);
|
|
2615
|
-
const tree = yield createTreeDriver("scroll-tree");
|
|
2616
|
-
// Verify tree is visible
|
|
2617
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2618
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:scroll")).toBeVisible();
|
|
2619
|
-
// Test keyboard scrolling performance
|
|
2620
|
-
yield tree.component.focus();
|
|
2621
|
-
// Scroll down 50 times rapidly
|
|
2622
|
-
const rapidScrollStartTime = performance.now();
|
|
2623
|
-
for (let i = 0; i < 50; i++) {
|
|
2624
|
-
yield tree.component.press("ArrowDown");
|
|
2625
|
-
}
|
|
2626
|
-
const rapidScrollTime = performance.now() - rapidScrollStartTime;
|
|
2627
|
-
// Rapid keyboard scrolling should remain responsive (< 2 seconds)
|
|
2628
|
-
(0, fixtures_1.expect)(rapidScrollTime).toBeLessThan(2000);
|
|
2629
|
-
// Verify we can reach different parts of the large list
|
|
2630
|
-
yield tree.component.press("Home"); // Go to start
|
|
2631
|
-
yield (0, fixtures_1.expect)(tree.getByTestId("1:scroll")).toBeVisible();
|
|
2632
|
-
yield tree.component.press("End"); // Go to end
|
|
2633
|
-
// Should be able to navigate to end without timeout
|
|
2634
|
-
}));
|
|
2635
|
-
});
|
|
2636
|
-
// =============================================================================
|
|
2637
|
-
// THEME VARIABLES TESTS
|
|
2638
|
-
// =============================================================================
|
|
2639
|
-
fixtures_1.test.describe("Theme Variables", () => {
|
|
2640
|
-
(0, fixtures_1.test)("applies custom tree text color theme variable", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
2641
|
-
const TEXT_COLOR = "rgb(128, 0, 128)";
|
|
2642
|
-
yield initTestBed(`
|
|
2643
|
-
<VStack height="400px">
|
|
2644
|
-
<Tree testId="tree"
|
|
2645
|
-
dataFormat="flat"
|
|
2646
|
-
defaultExpanded="all"
|
|
2647
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
2648
|
-
<property name="itemTemplate">
|
|
2649
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
2650
|
-
<Text value="{$item.name}" />
|
|
2651
|
-
</HStack>
|
|
2652
|
-
</property>
|
|
2653
|
-
</Tree>
|
|
2654
|
-
</VStack>
|
|
2655
|
-
`, {
|
|
2656
|
-
testThemeVars: {
|
|
2657
|
-
"textColor-Tree": TEXT_COLOR,
|
|
2658
|
-
},
|
|
2659
|
-
});
|
|
2660
|
-
const tree = yield createTreeDriver("tree");
|
|
2661
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
2662
|
-
const rowWrapper1 = tree.getNodeWrapperByTestId("1");
|
|
2663
|
-
const rowWrapper2 = tree.getNodeWrapperByTestId("2");
|
|
2664
|
-
const rowWrapper3 = tree.getNodeWrapperByTestId("3");
|
|
2665
|
-
const rowWrapper4 = tree.getNodeWrapperByTestId("4");
|
|
2666
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toBeVisible();
|
|
2667
|
-
// Test all items have correct default text color
|
|
2668
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toHaveCSS("color", TEXT_COLOR);
|
|
2669
|
-
yield (0, fixtures_1.expect)(rowWrapper2).toHaveCSS("color", TEXT_COLOR);
|
|
2670
|
-
yield (0, fixtures_1.expect)(rowWrapper3).toHaveCSS("color", TEXT_COLOR);
|
|
2671
|
-
yield (0, fixtures_1.expect)(rowWrapper4).toHaveCSS("color", TEXT_COLOR);
|
|
2672
|
-
}));
|
|
2673
|
-
(0, fixtures_1.test)("applies custom hover state theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, page, }) {
|
|
2674
|
-
const HOVER_BG_COLOR = "rgb(255, 255, 0)";
|
|
2675
|
-
const HOVER_TEXT_COLOR = "rgb(0, 0, 255)";
|
|
2676
|
-
yield initTestBed(`
|
|
2677
|
-
<VStack height="400px">
|
|
2678
|
-
<Tree testId="tree"
|
|
2679
|
-
dataFormat="flat"
|
|
2680
|
-
defaultExpanded="all"
|
|
2681
|
-
data='{${JSON.stringify(testData_1.flatTreeData)}}'>
|
|
2682
|
-
<property name="itemTemplate">
|
|
2683
|
-
<HStack testId="{$item.id}" verticalAlignment="center">
|
|
2684
|
-
<Text value="{$item.name}" />
|
|
2685
|
-
</HStack>
|
|
2686
|
-
</property>
|
|
2687
|
-
</Tree>
|
|
2688
|
-
</VStack>
|
|
2689
|
-
`, {
|
|
2690
|
-
testThemeVars: {
|
|
2691
|
-
"backgroundColor-Tree-row--hover": HOVER_BG_COLOR,
|
|
2692
|
-
"textColor-Tree--hover": HOVER_TEXT_COLOR,
|
|
2693
|
-
},
|
|
2694
|
-
});
|
|
2695
|
-
const tree = yield createTreeDriver("tree");
|
|
2696
|
-
// Get row wrappers directly using getNodeWrapperByMarker
|
|
2697
|
-
const rowWrapper1 = tree.getNodeWrapperByTestId("1");
|
|
2698
|
-
const rowWrapper2 = tree.getNodeWrapperByTestId("2");
|
|
2699
|
-
const rowWrapper3 = tree.getNodeWrapperByTestId("3");
|
|
2700
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toBeVisible();
|
|
2701
|
-
// Test hover on first item
|
|
2702
|
-
yield rowWrapper1.hover();
|
|
2703
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toHaveCSS("background-color", HOVER_BG_COLOR);
|
|
2704
|
-
yield (0, fixtures_1.expect)(rowWrapper1).toHaveCSS("color", HOVER_TEXT_COLOR);
|
|
2705
|
-
// Test hover on second item
|
|
2706
|
-
yield rowWrapper2.hover();
|
|
2707
|
-
yield (0, fixtures_1.expect)(rowWrapper2).toHaveCSS("background-color", HOVER_BG_COLOR);
|
|
2708
|
-
yield (0, fixtures_1.expect)(rowWrapper2).toHaveCSS("color", HOVER_TEXT_COLOR);
|
|
2709
|
-
// Test hover on third item
|
|
2710
|
-
yield rowWrapper3.hover();
|
|
2711
|
-
yield (0, fixtures_1.expect)(rowWrapper3).toHaveCSS("background-color", HOVER_BG_COLOR);
|
|
2712
|
-
yield (0, fixtures_1.expect)(rowWrapper3).toHaveCSS("color", HOVER_TEXT_COLOR);
|
|
2713
|
-
}));
|
|
2714
|
-
});
|
|
2715
|
-
// =============================================================================
|
|
2716
|
-
// EDGE CASES TESTS
|
|
2717
|
-
// =============================================================================
|
|
2718
|
-
fixtures_1.test.describe("Edge Cases", () => {
|
|
2719
|
-
(0, fixtures_1.test)("handles null/undefined data gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2720
|
-
yield initTestBed(`
|
|
2721
|
-
<VStack height="200px">
|
|
2722
|
-
<Tree
|
|
2723
|
-
testId="tree"
|
|
2724
|
-
data="{null}"
|
|
2725
|
-
dataFormat="flat"
|
|
2726
|
-
/>
|
|
2727
|
-
</VStack>
|
|
2728
|
-
`);
|
|
2729
|
-
const tree = yield createTreeDriver("tree");
|
|
2730
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2731
|
-
}));
|
|
2732
|
-
(0, fixtures_1.test)("handles malformed data gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2733
|
-
const malformedData = [
|
|
2734
|
-
{ id: 1, name: "Valid Item" },
|
|
2735
|
-
{ /* missing id */ name: "Invalid Item" },
|
|
2736
|
-
null,
|
|
2737
|
-
undefined,
|
|
2738
|
-
];
|
|
2739
|
-
yield initTestBed(`
|
|
2740
|
-
<VStack height="200px">
|
|
2741
|
-
<Tree
|
|
2742
|
-
testId="tree"
|
|
2743
|
-
data='{${JSON.stringify(malformedData)}}'
|
|
2744
|
-
dataFormat="flat"
|
|
2745
|
-
/>
|
|
2746
|
-
</VStack>
|
|
2747
|
-
`);
|
|
2748
|
-
const tree = yield createTreeDriver("tree");
|
|
2749
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2750
|
-
}));
|
|
2751
|
-
(0, fixtures_1.test)("handles circular references in hierarchy data", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver, }) {
|
|
2752
|
-
const circularData = [
|
|
2753
|
-
{ id: 1, name: "Item 1", parentId: 2 },
|
|
2754
|
-
{ id: 2, name: "Item 2", parentId: 1 },
|
|
2755
|
-
];
|
|
2756
|
-
yield initTestBed(`
|
|
2757
|
-
<VStack height="200px">
|
|
2758
|
-
<Tree
|
|
2759
|
-
testId="tree"
|
|
2760
|
-
data='{${JSON.stringify(circularData)}}'
|
|
2761
|
-
dataFormat="flat"
|
|
2762
|
-
/>
|
|
2763
|
-
</VStack>
|
|
2764
|
-
`);
|
|
2765
|
-
const tree = yield createTreeDriver("tree");
|
|
2766
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2767
|
-
}));
|
|
2768
|
-
(0, fixtures_1.test)("handles duplicate IDs gracefully", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2769
|
-
const duplicateIdData = [
|
|
2770
|
-
{ id: 1, name: "Item 1" },
|
|
2771
|
-
{ id: 1, name: "Duplicate Item 1" },
|
|
2772
|
-
{ id: 2, name: "Item 2" },
|
|
2773
|
-
];
|
|
2774
|
-
yield initTestBed(`
|
|
2775
|
-
<VStack height="200px">
|
|
2776
|
-
<Tree
|
|
2777
|
-
testId="tree"
|
|
2778
|
-
data='{${JSON.stringify(duplicateIdData)}}'
|
|
2779
|
-
dataFormat="flat"
|
|
2780
|
-
/>
|
|
2781
|
-
</VStack>
|
|
2782
|
-
`);
|
|
2783
|
-
const tree = yield createTreeDriver("tree");
|
|
2784
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2785
|
-
}));
|
|
2786
|
-
(0, fixtures_1.test)("handles orphaned nodes in flat data", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2787
|
-
const orphanedData = [
|
|
2788
|
-
{ id: 1, name: "Root Item" },
|
|
2789
|
-
{ id: 2, name: "Orphaned Item", parentId: 999 }, // non-existent parent
|
|
2790
|
-
];
|
|
2791
|
-
yield initTestBed(`
|
|
2792
|
-
<VStack height="200px">
|
|
2793
|
-
<Tree
|
|
2794
|
-
testId="tree"
|
|
2795
|
-
data='{${JSON.stringify(orphanedData)}}'
|
|
2796
|
-
dataFormat="flat"
|
|
2797
|
-
/>
|
|
2798
|
-
</VStack>
|
|
2799
|
-
`);
|
|
2800
|
-
const tree = yield createTreeDriver("tree");
|
|
2801
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2802
|
-
}));
|
|
2803
|
-
(0, fixtures_1.test)("handles deeply nested data structures", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2804
|
-
const deepData = Array.from({ length: 100 }, (_, i) => ({
|
|
2805
|
-
id: i + 1,
|
|
2806
|
-
name: `Level ${i + 1}`,
|
|
2807
|
-
parentId: i === 0 ? null : i,
|
|
2808
|
-
}));
|
|
2809
|
-
yield initTestBed(`
|
|
2810
|
-
<VStack height="200px">
|
|
2811
|
-
<Tree
|
|
2812
|
-
testId="tree"
|
|
2813
|
-
data='{${JSON.stringify(deepData)}}'
|
|
2814
|
-
dataFormat="flat"
|
|
2815
|
-
selectedValue="{100}"
|
|
2816
|
-
/>
|
|
2817
|
-
</VStack>
|
|
2818
|
-
`);
|
|
2819
|
-
const tree = yield createTreeDriver("tree");
|
|
2820
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2821
|
-
}));
|
|
2822
|
-
(0, fixtures_1.test)("handles invalid dataFormat values", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTreeDriver }) {
|
|
2823
|
-
const orphanedData = [
|
|
2824
|
-
{ id: 1, name: "Root Item" },
|
|
2825
|
-
{ id: 2, name: "Orphaned Item", parentId: 999 }, // non-existent parent
|
|
2826
|
-
];
|
|
2827
|
-
yield initTestBed(`
|
|
2828
|
-
<VStack height="200px">
|
|
2829
|
-
<Tree
|
|
2830
|
-
testId="tree"
|
|
2831
|
-
data='{${JSON.stringify(orphanedData)}}'
|
|
2832
|
-
dataFormat="invalid-format"
|
|
2833
|
-
/>
|
|
2834
|
-
</VStack>
|
|
2835
|
-
`);
|
|
2836
|
-
const tree = yield createTreeDriver("tree");
|
|
2837
|
-
yield (0, fixtures_1.expect)(tree.component).toBeVisible();
|
|
2838
|
-
}));
|
|
2839
|
-
});
|