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:
46
e2e/nested-frame-navigation/app/tabs-page/tabs-top-page.ts
Normal file
46
e2e/nested-frame-navigation/app/tabs-page/tabs-top-page.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { EventData } from "tns-core-modules/ui/page";
|
||||
import { Button } from "tns-core-modules/ui/button";
|
||||
|
||||
export function onNavigate(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate("some-page/some-page");
|
||||
}
|
||||
|
||||
export function onNavigateNone(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate({
|
||||
moduleName: "some-page/some-page",
|
||||
animated: false
|
||||
});
|
||||
}
|
||||
|
||||
export function onNavigateSlide(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate({
|
||||
moduleName: "some-page/some-page",
|
||||
animated: true,
|
||||
transition: {
|
||||
name: "slide",
|
||||
duration: 300,
|
||||
curve: "easeIn"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function onNavigateFlip(args: EventData) {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.navigate({
|
||||
moduleName: "some-page/some-page",
|
||||
animated: true,
|
||||
transition: {
|
||||
name: "flip",
|
||||
duration: 300,
|
||||
curve: "easeIn"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function onBackButtonTap(args: EventData): void {
|
||||
const button = <Button>args.object;
|
||||
button.page.frame.goBack();
|
||||
}
|
||||
Reference in New Issue
Block a user