mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: tab navigations don't work with lowercase xml (#8016)
This commit is contained in:
19
tests/app/ui/tab-view/tab-view-tests-new.ts
Normal file
19
tests/app/ui/tab-view/tab-view-tests-new.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Label, Builder, TabView, TabViewItem } from "@nativescript/core/ui";
|
||||
import * as TKUnit from "../../tk-unit";
|
||||
|
||||
export function test_lowercase_declaration() {
|
||||
const root = Builder.parse(`
|
||||
<tab-view>
|
||||
<tab-view-item id="tab-view-item">
|
||||
<label text="test" id="tab-view-item-label" />
|
||||
</tab-view-item>
|
||||
</tab-view>
|
||||
`);
|
||||
|
||||
const tabViewItem = root.getViewById("tab-view-item");
|
||||
const tabViewItemLabel = root.getViewById("tab-view-item-label");
|
||||
|
||||
TKUnit.assert(root instanceof TabView, "Expected result: TabView!; Actual result: " + root);
|
||||
TKUnit.assert(tabViewItem instanceof TabViewItem, "Expected result: TabViewItem!; Actual result: " + tabViewItem);
|
||||
TKUnit.assert(tabViewItemLabel instanceof Label, "Expected result: Label!; Actual result: " + tabViewItemLabel);
|
||||
}
|
||||
Reference in New Issue
Block a user