fix: tab navigations don't work with lowercase xml (#8016)

This commit is contained in:
Martin Yankov
2019-11-21 14:48:33 +02:00
committed by GitHub
parent b069ff38f3
commit 800f5bcfe4
11 changed files with 116 additions and 17 deletions

View 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);
}