mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore(e2e): add tabs & bottom nav test scenarios (#7434)
This commit is contained in:
@@ -20,22 +20,49 @@ export function onNavigateToPageMultiFrame(args: EventData) {
|
||||
button.page.frame.navigate("frame-root/frame-multi-home-page");
|
||||
}
|
||||
|
||||
export function onNavigateToTabViewTopPage(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate("tab-page/tab-top-page");
|
||||
}
|
||||
|
||||
export function onNavigateToTabViewBottomPage(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate("tab-page/tab-bottom-page");
|
||||
}
|
||||
|
||||
export function onNavigateToTabViewTopRoot(args: EventData) {
|
||||
application._resetRootView({ moduleName: "tab-root/tab-top-root" });
|
||||
}
|
||||
|
||||
export function onNavigateToTabViewBottomRoot(args: EventData) {
|
||||
application._resetRootView({ moduleName: "tab-root/tab-bottom-root" });
|
||||
}
|
||||
|
||||
export function onNavigateToBottomNavigationPage(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate("bottom-navigation-page/bottom-navigation-page");
|
||||
}
|
||||
|
||||
export function onNavigateToBottomNavigationRoot(args: EventData) {
|
||||
application._resetRootView({ moduleName: "bottom-navigation-root/bottom-navigation-root" });
|
||||
}
|
||||
|
||||
export function onNavigateToTabsTopPage(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate("tab-page/tabs-top-page");
|
||||
button.page.frame.navigate("tabs-page/tabs-top-page");
|
||||
}
|
||||
|
||||
export function onNavigateToTabsBottomPage(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate("tab-page/tabs-bottom-page");
|
||||
button.page.frame.navigate("tabs-page/tabs-bottom-page");
|
||||
}
|
||||
|
||||
export function onNavigateToTabsTopRoot(args: EventData) {
|
||||
application._resetRootView({ moduleName: "tab-root/tab-top-root" });
|
||||
application._resetRootView({ moduleName: "tabs-root/tabs-top-root" });
|
||||
}
|
||||
|
||||
export function onNavigateToTabsBottomRoot(args: EventData) {
|
||||
application._resetRootView({ moduleName: "tab-root/tab-bottom-root" });
|
||||
application._resetRootView({ moduleName: "tabs-root/tabs-bottom-root" });
|
||||
}
|
||||
|
||||
export function onNavigateToSomePage(args: EventData) {
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
<Button text="Layout w/ multi frame" tap="onNavigateToLayoutMultiFrame" />
|
||||
<Button text="Page w/ frame" tap="onNavigateToPageFrame" />
|
||||
<Button text="Page w/ multi frame" tap="onNavigateToPageMultiFrame" />
|
||||
<Button text="Page w/ tabview (top)" tap="onNavigateToTabViewTopPage" />
|
||||
<Button text="Page w/ tabview (bottom)" tap="onNavigateToTabViewBottomPage" />
|
||||
<Button text="Root tabview (top)" tap="onNavigateToTabViewTopRoot" />
|
||||
<Button text="Root tabview (bottom)" tap="onNavigateToTabViewBottomRoot" />
|
||||
<Button text="Page w/ bottom navigation" tap="onNavigateToBottomNavigationPage" />
|
||||
<Button text="Root bottom navigation" tap="onNavigateToBottomNavigationRoot" />
|
||||
<Button text="Page w/ tabs (top)" tap="onNavigateToTabsTopPage" />
|
||||
<Button text="Page w/ tabs (bottom)" tap="onNavigateToTabsBottomPage" />
|
||||
<Button text="Root tabs (top)" tap="onNavigateToTabsTopRoot" />
|
||||
|
||||
Reference in New Issue
Block a user