diff --git a/README.md b/README.md index 69ccc7a75..41c177784 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ This repository contains the code for integration of NativeScript with Angular. The `ng-sample` app is meant for testing stuff while developing the renderer code, and isn't the best example out there. You can take a look at these sample apps that use the published builds from npm: * [Hello world starter](https://github.com/NativeScript/template-hello-world-ng) +* [Master-detail template](https://github.com/NativeScript/template-master-detail-ng) +* [Drawer navigation template](https://github.com/NativeScript/template-drawer-navigation-ng) +* [TabView navigation template](https://github.com/NativeScript/template-tab-navigation-ng) +* [NativeScript Angular SDK examples](https://github.com/NativeScript/nativescript-sdk-examples-ng) * [TodoMVC sample implementation](https://github.com/NativeScript/sample-ng-todomvc) ## Contribute diff --git a/e2e/README.md b/e2e/README.md new file mode 100644 index 000000000..32bd92ad0 --- /dev/null +++ b/e2e/README.md @@ -0,0 +1,50 @@ +# NativeScript Angular E2E Tests + +This folder contains a number of projects containing e2e tests for NativeScript Angular integration. + +## Projects Description + + - [`renderer`](renderer) - Tests for the nativescript-angular renderer features. Creating/adding/removing elements for the nativescript visual tree. + + - [`router`](router) - Tests for angular router and navigation. This app contains a mixed scenario with `` and ``. + + - [`single-page`](single-page) - Tests for angular router and navigation. This is a simple app with only one level navigation using ``. + + - [`modal-navigation-ng`](modal-navigation-ng) - Tests for different scenarios of showing and navigation in modal dialogs. + + - [`router-tab-view`](router-tab-view) - Tests for navigation in a TabComponent containing named(aux) `` instances. + +## Global Appium Setup + +Install external dependencies for nativescript-dev-appium described [here](https://github.com/NativeScript/nativescript-dev-appium#setup). + + +All projects use the same [appium capabilities files](config/appium.capabilities.json). + + +## Running Tests + +Make sure you build or run the project with the NativeScript CLI first: +``` +tns build android +tns run ios +``` + +Run appium tests with the `e2e` npm task. Check ns-dev-appium options [here](https://github.com/NativeScript/nativescript-dev-appium#options) + +Examples: + +``` +npm run e2e -- --runType android23 + +npm run e2e -- --runType sim.iPhone8.iOS112 +``` + +For **development** you can use `--devMode` flag to reuse the current emulator and the currently installed application: + +Examples: +``` +npm run e2e -- --runType android23 --devMode + +npm run e2e -- --runType sim.iPhone8.iOS112 --devMode +``` diff --git a/e2e/config/appium.capabilities.json b/e2e/config/appium.capabilities.json index 822dd9d0b..befcaf973 100644 --- a/e2e/config/appium.capabilities.json +++ b/e2e/config/appium.capabilities.json @@ -4,20 +4,16 @@ "platformVersion": "4.4", "deviceName": "test", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": true, - "fullReset": false, - "app": "" + "fullReset": false }, "nexus5": { "browserName": "", "platformName": "Android", "platformVersion": "6.0", "deviceName": "device", - "udid": "077e4a47003b7698", - "appActivity": "com.tns.NativeScriptActivity", - "app": "" + "udid": "077e4a47003b7698" }, "android19": { "platformName": "Android", @@ -25,11 +21,9 @@ "deviceName": "Emulator-Api19-Default", "avd": "Emulator-Api19-Default", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": false, - "fullReset": false, - "app": "" + "fullReset": false }, "android21": { "platformName": "Android", @@ -37,11 +31,9 @@ "deviceName": "Emulator-Api21-Default", "avd": "Emulator-Api21-Default", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": false, - "fullReset": false, - "app": "" + "fullReset": false }, "android23": { "platformName": "Android", @@ -49,11 +41,9 @@ "deviceName": "Emulator-Api23-Default", "avd": "Emulator-Api23-Default", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": false, - "fullReset": false, - "app": "" + "fullReset": false }, "android24": { "platformName": "Android", @@ -61,11 +51,9 @@ "deviceName": "Emulator-Api24-Default", "avd": "Emulator-Api24-Default", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": false, - "fullReset": false, - "app": "" + "fullReset": false }, "android25": { "platformName": "Android", @@ -73,11 +61,9 @@ "deviceName": "Emulator-Api25-Google", "avd": "Emulator-Api25-Google", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": false, - "fullReset": false, - "app": "" + "fullReset": false }, "android26": { "platformName": "Android", @@ -86,11 +72,9 @@ "avd": "Emulator-Api26-Google", "lt": 60000, "automationName": "UIAutomator2", - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": false, - "fullReset": false, - "app": "" + "fullReset": false }, "android27": { "platformName": "Android", @@ -98,42 +82,36 @@ "deviceName": "Emulator-Api27-Google", "avd": "Emulator-Api27-Google", "lt": 60000, - "appActivity": "com.tns.NativeScriptActivity", "newCommandTimeout": 720, "noReset": true, - "fullReset": false, - "app": "" + "fullReset": false }, "sim.iPhone7.iOS100": { "platformName": "iOS", "platformVersion": "10.0", "deviceName": "iPhone 7 100", "noReset": true, - "fullReset": false, - "app": "" + "fullReset": false }, "sim.iPhone7.iOS110": { "platformName": "iOS", "platformVersion": "11.2", "deviceName": "iPhone 7 110", "noReset": true, - "fullReset": false, - "app": "" + "fullReset": false }, "sim.iPhone8.iOS112": { "platformName": "iOS", "platformVersion": "11.2", "deviceName": "iPhone 8 112", "noReset": true, - "fullReset": false, - "app": "" + "fullReset": false }, "sim.iPhoneX.iOS110": { "platformName": "iOS", "platformVersion": "11.2", "deviceName": "iPhone X 110", "noReset": true, - "fullReset": false, - "app": "" + "fullReset": false } }