diff --git a/.gitignore b/.gitignore index 76eff7cd8..b2ac3aa00 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ apps/lib/ apps/hooks/ apps/node_modules/ +e2e/**/platforms + package-lock.json .nsbuildinfo \ No newline at end of file diff --git a/DevelopmentWorkflow.md b/DevelopmentWorkflow.md index 2668b92c9..cc7d02bb8 100644 --- a/DevelopmentWorkflow.md +++ b/DevelopmentWorkflow.md @@ -6,6 +6,7 @@ Development Workflow The repository contains several packages and apps: - `tns-core-modules` - The core NativeScript TypeScript modules used to develop NativeScript apps. - `apps` - UI app used for manual testing and automation. + - `e2e` - applications and *e2e* tests. - `tests` - Unit tests app for the `tns-core-modules`. - `tns-platform-declarations` - TypeScript definitions for Android and iOS native APIs. @@ -18,6 +19,9 @@ Managing dependencies: - `apps` depends on: - `tns-platform-declarations` - `tns-core-modules` + - `e2e` depends on: + - `tns-platform-declarations` + - `tns-core-modules` - `tests` depends on: - `tns-platform-declarations` - `tns-core-modules` @@ -26,22 +30,27 @@ Managing dependencies: this dependency contains native code and is rarely modified so for now it remains outside this repo. ## Initial Setup + Clone (or fork/clone) the repo: + ```bash git clone https://github.com/NativeScript/NativeScript.git ``` Install devDependencies: + ```bash npm install ``` -Run setup script. This will [`npm link`](https://docs.npmjs.com/cli/link) the `tns-core-modules` and `tns-core-modules-declarations` dependencies inside the `tests` and `apps` projects. +Run `setup` script. This will [`npm link`](https://docs.npmjs.com/cli/link) the `tns-core-modules` and `tns-core-modules-declarations` dependencies inside the `tests`, `apps` and `e2e` projects. + ```bash npm run setup ``` ## TypeScript + The following commands are commonly used to compile the `tns-core-modules`: ```bash # Full tsc with type checking ~22.2s. @@ -55,18 +64,22 @@ tsc --skipLibCheck -w ``` The modules have `typescript` as a devDependency so you should also be able to use the locally installed TypeScript compiler from node_modules: + ```bash ./node_modules/.bin/tsc ``` -You can compile the TypeScript files in the `tns-core-modules`, `tns-platform-declarations`, `apps` and `tests` at once at the root of the repo: +You can compile the TypeScript files in the `tns-core-modules`, `tns-platform-declarations`, `apps`, `e2e` and `tests` at once at the root of the repo: + ```bash npm run tsc ``` ## Running Unit Tests + The test app is an ordinary NativeScript app that logs the test results as it go. After the [initial setup](#initial-setup) you can run the tests with: + ```bash # Make sure TypeScript is transpiled tsc @@ -91,6 +104,7 @@ tns run android --path apps ``` ## Running Another App + The [initial setup](#initial-setup) will `npm-link` the `tns-core-modules` globally. You can use it in any local project: ```bash @@ -101,25 +115,33 @@ npm link tns-core-modules tns run ios tns run android ``` ->Note: You still have to rebuild the TypeScript if you have made changes in the code of the core-modules. + +> Note: You still have to rebuild the TypeScript if you have made changes in the code of the core-modules. ## Platform declarations To update the platform declarations (the ios.d.ts-es) you can run: + ``` npm install npm run dev-declarations ``` + This script will update the iOS declarations. Android tools are not integrated yet. The declarations are generated from the test app and will include the native code from tns-core-modules-widgets. # Documentation API reference + The following will build the API reference pages in `bin/dist/apiref`: + ``` npm run typedoc ``` + If you want to improve on the documentation you can also build and start up dev web server: + ``` npm run dev-typedoc ``` + The terminal will point the address you can open in your web browsed. diff --git a/apps/package.json b/apps/package.json index f5cf7c4f8..a8ac4a6db 100644 --- a/apps/package.json +++ b/apps/package.json @@ -6,10 +6,10 @@ "nativescript": { "id": "org.nativescript.apps", "tns-ios": { - "version": "3.2.0" + "version": "3.4.1" }, "tns-android": { - "version": "3.2.0" + "version": "3.4.1" } }, "dependencies": { diff --git a/e2e/modal-navigation/.vscode/launch.json b/e2e/modal-navigation/.vscode/launch.json new file mode 100644 index 000000000..d89bf7bf3 --- /dev/null +++ b/e2e/modal-navigation/.vscode/launch.json @@ -0,0 +1,61 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "name": "Launch on iOS", + "type": "nativescript", + "request": "launch", + "platform": "ios", + "appRoot": "${workspaceRoot}", + "sourceMaps": true, + "stopOnEntry": true, + "tnsArgs": [ + "--syncAllFiles" + ], + "watch": true + }, + { + "name": "Attach on iOS", + "type": "nativescript", + "request": "attach", + "platform": "ios", + "appRoot": "${workspaceRoot}", + "sourceMaps": true, + "stopOnEntry": true, + "tnsArgs": [ + "--syncAllFiles" + ], + "watch": false + }, + { + "name": "Launch on Android", + "type": "nativescript", + "request": "launch", + "platform": "android", + "appRoot": "${workspaceRoot}", + "sourceMaps": true, + "stopOnEntry": true, + "tnsArgs": [ + "--syncAllFiles" + ], + "watch": true + }, + { + "name": "Attach on Android", + "type": "nativescript", + "request": "attach", + "platform": "android", + "appRoot": "${workspaceRoot}", + "sourceMaps": true, + "stopOnEntry": true, + "tnsArgs": [ + "--syncAllFiles" + ], + "watch": false + } + ] +} \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/Android/AndroidManifest.xml b/e2e/modal-navigation/app/App_Resources/Android/AndroidManifest.xml new file mode 100644 index 000000000..9db832151 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/e2e/modal-navigation/app/App_Resources/Android/app.gradle b/e2e/modal-navigation/app/App_Resources/Android/app.gradle new file mode 100644 index 000000000..b7f79695b --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/app.gradle @@ -0,0 +1,16 @@ +// Add your native dependencies here: + +// Uncomment to add recyclerview-v7 dependency +//dependencies { +// compile 'com.android.support:recyclerview-v7:+' +//} + +android { + defaultConfig { + generatedDensities = [] + applicationId = "org.nativescript.modalnavigation" + } + aaptOptions { + additionalParameters "--no-version-vectors" + } +} diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/background.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/background.png new file mode 100644 index 000000000..eb381c258 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/background.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/icon.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/icon.png new file mode 100755 index 000000000..9cde84cd5 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/icon.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/logo.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/logo.png new file mode 100644 index 000000000..5218f4c90 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-hdpi/logo.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/background.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/background.png new file mode 100644 index 000000000..748b2adf5 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/background.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/icon.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/icon.png new file mode 100755 index 000000000..4d6a674b3 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/icon.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/logo.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/logo.png new file mode 100644 index 000000000..b9e102a76 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-ldpi/logo.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/background.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/background.png new file mode 100644 index 000000000..efeaf2907 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/background.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/icon.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/icon.png new file mode 100755 index 000000000..92ccc85a6 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/icon.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/logo.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/logo.png new file mode 100644 index 000000000..626338766 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-mdpi/logo.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-nodpi/splash_screen.xml b/e2e/modal-navigation/app/App_Resources/Android/drawable-nodpi/splash_screen.xml new file mode 100644 index 000000000..ada77f92c --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/drawable-nodpi/splash_screen.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/background.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/background.png new file mode 100644 index 000000000..612bbd072 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/background.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/icon.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/icon.png new file mode 100644 index 000000000..8bcde6277 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/icon.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/logo.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/logo.png new file mode 100644 index 000000000..ad8ee2f4b Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xhdpi/logo.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/background.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/background.png new file mode 100644 index 000000000..0fa88e235 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/background.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/icon.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/icon.png new file mode 100644 index 000000000..9d81c85dc Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/icon.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/logo.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/logo.png new file mode 100644 index 000000000..668327832 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxhdpi/logo.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/background.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/background.png new file mode 100644 index 000000000..c650f6438 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/background.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/icon.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/icon.png new file mode 100644 index 000000000..9a34d0d43 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/icon.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/logo.png b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/logo.png new file mode 100644 index 000000000..fa6331c8d Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/Android/drawable-xxxhdpi/logo.png differ diff --git a/e2e/modal-navigation/app/App_Resources/Android/values-v21/colors.xml b/e2e/modal-navigation/app/App_Resources/Android/values-v21/colors.xml new file mode 100644 index 000000000..a64641a9d --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/values-v21/colors.xml @@ -0,0 +1,4 @@ + + + #3d5afe + \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/Android/values-v21/styles.xml b/e2e/modal-navigation/app/App_Resources/Android/values-v21/styles.xml new file mode 100644 index 000000000..dac8727c8 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/values-v21/styles.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/Android/values/colors.xml b/e2e/modal-navigation/app/App_Resources/Android/values/colors.xml new file mode 100644 index 000000000..74ad8829c --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/values/colors.xml @@ -0,0 +1,7 @@ + + + #F5F5F5 + #757575 + #33B5E5 + #272734 + \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/Android/values/styles.xml b/e2e/modal-navigation/app/App_Resources/Android/values/styles.xml new file mode 100644 index 000000000..c793e6d4c --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/Android/values/styles.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..4034b76e6 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon-83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "icon-1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png new file mode 100644 index 000000000..a1d7eb479 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 000000000..bb9b9e86d Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png new file mode 100644 index 000000000..ec609dcf3 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png new file mode 100644 index 000000000..a97180800 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 000000000..214800ee6 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png new file mode 100644 index 000000000..8554b88a8 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png new file mode 100644 index 000000000..a22626bae Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png new file mode 100644 index 000000000..a22626bae Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png new file mode 100644 index 000000000..492c9c8e8 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 000000000..9208113cf Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png new file mode 100644 index 000000000..24415e5a3 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png new file mode 100644 index 000000000..b3ef1bf0c Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/Contents.json b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 000000000..11bfcf55c --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,176 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "2436h", + "filename" : "Default-1125h.png", + "minimum-system-version" : "11.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "orientation" : "landscape", + "idiom" : "iphone", + "extent" : "full-screen", + "filename" : "Default-Landscape-X.png", + "minimum-system-version" : "11.0", + "subtype" : "2436h", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-736h@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-Landscape@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "Default-667h@2x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "Default-568h@2x.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default-568h@2x.png", + "extent" : "full-screen", + "subtype" : "retina4", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png new file mode 100644 index 000000000..2913f85d9 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png new file mode 100644 index 000000000..d7f17fcd2 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png new file mode 100644 index 000000000..b88415405 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png new file mode 100644 index 000000000..faab4b631 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png new file mode 100644 index 000000000..cd94a3ac2 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png new file mode 100644 index 000000000..3365ba3cd Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png new file mode 100644 index 000000000..a44945c1a Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png new file mode 100644 index 000000000..e6dca6269 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png new file mode 100644 index 000000000..1a5007962 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png new file mode 100644 index 000000000..73d8b920f Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png new file mode 100644 index 000000000..9f1f6ce3e Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png new file mode 100644 index 000000000..514fc5cde Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json new file mode 100644 index 000000000..4f4e9c506 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png new file mode 100644 index 000000000..c293f9c7a Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png new file mode 100644 index 000000000..233693a6e Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json new file mode 100644 index 000000000..23c0ffd7a --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png new file mode 100644 index 000000000..a5a775a2b Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png new file mode 100644 index 000000000..154c19343 Binary files /dev/null and b/e2e/modal-navigation/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png differ diff --git a/e2e/modal-navigation/app/App_Resources/iOS/Info.plist b/e2e/modal-navigation/app/App_Resources/iOS/Info.plist new file mode 100644 index 000000000..ea3e3ea23 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/e2e/modal-navigation/app/App_Resources/iOS/LaunchScreen.storyboard b/e2e/modal-navigation/app/App_Resources/iOS/LaunchScreen.storyboard new file mode 100644 index 000000000..c4e5a3f39 --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/LaunchScreen.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/e2e/modal-navigation/app/App_Resources/iOS/build.xcconfig b/e2e/modal-navigation/app/App_Resources/iOS/build.xcconfig new file mode 100644 index 000000000..9d738435d --- /dev/null +++ b/e2e/modal-navigation/app/App_Resources/iOS/build.xcconfig @@ -0,0 +1,7 @@ +// You can add custom settings here +// for example you can uncomment the following line to force distribution code signing +// CODE_SIGN_IDENTITY = iPhone Distribution +// To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/e2e/modal-navigation/app/app-root.xml b/e2e/modal-navigation/app/app-root.xml new file mode 100644 index 000000000..0455ca9ea --- /dev/null +++ b/e2e/modal-navigation/app/app-root.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/e2e/modal-navigation/app/app.css b/e2e/modal-navigation/app/app.css new file mode 100644 index 000000000..ff57461c5 --- /dev/null +++ b/e2e/modal-navigation/app/app.css @@ -0,0 +1,13 @@ +/* +In NativeScript, the app.css file is where you place CSS rules that +you would like to apply to your entire application. Check out +http://docs.nativescript.org/ui/styling for a full list of the CSS +selectors and properties you can use to style UI components. + +/* +For example, the following CSS rule changes the font size of all UI +components that have the btn class name. +*/ +.btn { + font-size: 18; +} diff --git a/e2e/modal-navigation/app/app.ts b/e2e/modal-navigation/app/app.ts new file mode 100644 index 000000000..100be80a5 --- /dev/null +++ b/e2e/modal-navigation/app/app.ts @@ -0,0 +1,4 @@ +import * as application from "tns-core-modules/application"; + +application.run({ moduleName: "app-root" }); +// application.run({ moduleName: "tab-root" }); diff --git a/e2e/modal-navigation/app/home/home-page.ts b/e2e/modal-navigation/app/home/home-page.ts new file mode 100644 index 000000000..2da3cde7f --- /dev/null +++ b/e2e/modal-navigation/app/home/home-page.ts @@ -0,0 +1,61 @@ +import * as application from "tns-core-modules/application"; +import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; +import { NavigatedData, Page } from "tns-core-modules/ui/page"; +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"); +} + +export function onNavigatingFrom(args: NavigatedData) { + console.log("home-page onNavigatingFrom"); +} + +export function onNavigatedTo(args: NavigatedData) { + console.log("home-page onNavigatedTo"); +} + +export function onNavigatedFrom(args: NavigatedData) { + console.log("home-page onNavigatedFrom"); +} + +export function onModalFrame(args: EventData) { + const view = args.object as View; + + const frame = new Frame(); + frame.navigate("modal/modal-page"); + + view.showModal(frame, + "context", + () => console.log("home-page modal frame closed"), + false); +} + +export function onModalPage(args: EventData) { + const view = args.object as View; + view.showModal("modal/modal-page", + { frameless: true }, + () => console.log("home-page modal page closed"), + false); +} + +export function onModalTabView(args: EventData) { + const view = args.object as View; + view.showModal("modal-tab/modal-tab-root", + { frameless: true }, + () => console.log("home-page modal tabview closed"), + false); +} + +export function onNavigate(args: EventData) { + const view = args.object as View; + const page = view.page as Page; + page.frame.navigate("second/second-page"); +} + +export function onRootViewChange() { + let rootView: View = application.getRootView(); + rootView.typeName === "Frame" ? application._resetRootView({moduleName: "tab-root"}) : application._resetRootView({moduleName: "app-root"}); +} diff --git a/e2e/modal-navigation/app/home/home-page.xml b/e2e/modal-navigation/app/home/home-page.xml new file mode 100644 index 000000000..a34618a34 --- /dev/null +++ b/e2e/modal-navigation/app/home/home-page.xml @@ -0,0 +1,19 @@ + + + + + + + +