diff --git a/e2e/modal-navigation/.gitignore b/e2e/modal-navigation/.gitignore new file mode 100644 index 000000000..c6f9a448e --- /dev/null +++ b/e2e/modal-navigation/.gitignore @@ -0,0 +1 @@ +.vscode/settings.json diff --git a/e2e/modal-navigation/.vscode/launch.json b/e2e/modal-navigation/.vscode/launch.json index 55dae90bf..a017624a8 100644 --- a/e2e/modal-navigation/.vscode/launch.json +++ b/e2e/modal-navigation/.vscode/launch.json @@ -53,7 +53,7 @@ "platform": "ios", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "stopOnEntry": true, + "stopOnEntry": false, "tnsArgs": [ "--syncAllFiles" ], @@ -78,7 +78,7 @@ "platform": "android", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "stopOnEntry": true, + "stopOnEntry": false, "tnsArgs": [ "--syncAllFiles" ], diff --git a/e2e/modal-navigation/README.md b/e2e/modal-navigation/README.md index b3371f391..02de270d7 100644 --- a/e2e/modal-navigation/README.md +++ b/e2e/modal-navigation/README.md @@ -4,13 +4,13 @@ Execute Tests Android: ``` -npm run e2e -- --runType android23 --reuseDevice +npm run e2e -- --runType android23 # --devMode ``` iOS: ``` -npm run e2e -- --runType sim.iPhoneX.iOS112 --reuseDevice +npm run e2e -- --runType sim.iPhoneX.iOS112 # --devMode ``` Scenarios @@ -32,7 +32,15 @@ ROOT FRAME: 2. Show nested modal dialog with frame 2. Close nested modal dialog 3. Close modal dialog -3. [Done] Show modal tabview +3. [Done] Show modal layout + 1. Navigate to modal second page within modal dialog + 1. Go back + 2. Show nested modal dialog + 2. Close nested modal dialog + 3. Show nested modal dialog with frame + 3. Close nested modal dialog + 4. Close modal dialog +4. [Done] Show modal tabview 1. Navigate to second page within tab item frame 1. Go back 2. Show nested modal dialog @@ -40,7 +48,7 @@ ROOT FRAME: 3. Show nested modal dialog with frame 3. Close nested modal dialog 4. Close modal dialog -4. Navigate to second page within root frame +5. Navigate to second page within root frame 1. Show modal dialog with frame 1. Navigate to second page within modal dialog 1. Go back @@ -57,6 +65,10 @@ ROOT FRAME: 3. Close modal dialog 3. Go back +ROOT LAYOUT: + +[Same as above] + ROOT TABVIEW: [Same as above] diff --git a/e2e/modal-navigation/app/home/home-page.ts b/e2e/modal-navigation/app/home/home-page.ts index 3a0b9a9af..f7871e800 100644 --- a/e2e/modal-navigation/app/home/home-page.ts +++ b/e2e/modal-navigation/app/home/home-page.ts @@ -5,7 +5,6 @@ import { View, EventData } from "tns-core-modules/ui/core/view"; import { Frame } from "tns-core-modules/ui/frame"; export function onNavigatingTo(args: NavigatedData) { - const page = args.object; console.log("home-page onNavigatingTo"); } @@ -66,7 +65,10 @@ export function onModalTabView(args: EventData) { export function onNavigate(args: EventData) { const view = args.object as View; const page = view.page as Page; - page.frame.navigate("second/second-page"); + // In the layout root case for iOS, the page will be null + if (page) { + page.frame.navigate("second/second-page"); + } } export function onFrameRootViewReset() { diff --git a/e2e/modal-navigation/app/layout-root.xml b/e2e/modal-navigation/app/layout-root.android.xml similarity index 80% rename from e2e/modal-navigation/app/layout-root.xml rename to e2e/modal-navigation/app/layout-root.android.xml index ee0b59854..313834dc1 100644 --- a/e2e/modal-navigation/app/layout-root.xml +++ b/e2e/modal-navigation/app/layout-root.android.xml @@ -1,3 +1,3 @@ - \ No newline at end of file + diff --git a/e2e/modal-navigation/app/layout-root.ios.ts b/e2e/modal-navigation/app/layout-root.ios.ts new file mode 100644 index 000000000..403480d1e --- /dev/null +++ b/e2e/modal-navigation/app/layout-root.ios.ts @@ -0,0 +1,10 @@ +export { + onModalFrame, + onModalPage, + onModalLayout, + onModalTabView, + onNavigate, + onFrameRootViewReset, + onTabRootViewReset, + onLayoutRootViewReset +} from "./home/home-page"; diff --git a/e2e/modal-navigation/app/layout-root.ios.xml b/e2e/modal-navigation/app/layout-root.ios.xml new file mode 100644 index 000000000..40d6d68bd --- /dev/null +++ b/e2e/modal-navigation/app/layout-root.ios.xml @@ -0,0 +1,11 @@ + +