From 70fb4025efeea246ffad5d796439fa6d333e3d80 Mon Sep 17 00:00:00 2001 From: vakrilov Date: Tue, 24 Apr 2018 14:29:48 +0300 Subject: [PATCH 1/4] chore(docs): Add readme.md for e2e projects --- README.md | 4 ++++ e2e/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 e2e/README.md 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..955181368 --- /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) - Test for angular router and navigation. This app contains a mixed scenario with `` and ``. + + - [`single-page`](single-page) - Test 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). Make sure you p + + +## 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 +``` \ No newline at end of file From b86ec0c4c29695cf3a6ba84be638c9bf24252e10 Mon Sep 17 00:00:00 2001 From: Alexander Vakrilov Date: Tue, 24 Apr 2018 16:03:40 +0300 Subject: [PATCH 2/4] chore(docs): updates --- e2e/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/README.md b/e2e/README.md index 955181368..2858be426 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -6,9 +6,9 @@ This folder contains a number of projects containing e2e tests for NativeScript - [`renderer`](renderer) - Tests for the nativescript-angular renderer features. Creating/adding/removing elements for the nativescript visual tree. - - [`router`](router) - Test for angular router and navigation. This app contains a mixed scenario with `` and ``. + - [`router`](router) - Tests for angular router and navigation. This app contains a mixed scenario with `` and ``. - - [`single-page`](single-page) - Test for angular router and navigation. This is a simple app with only one level navigation using ``. + - [`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. @@ -47,4 +47,4 @@ Examples: npm run e2e -- --runType android23 --devMode npm run e2e -- --runType sim.iPhone8.iOS112 --devMode -``` \ No newline at end of file +``` From 27d8502ce3f10cc87aebb182f15e8ce2eb0ae806 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Wed, 25 Apr 2018 12:02:05 +0300 Subject: [PATCH 3/4] remove unfinished sentence --- e2e/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/README.md b/e2e/README.md index 2858be426..32bd92ad0 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -19,7 +19,7 @@ This folder contains a number of projects containing e2e tests for NativeScript 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). Make sure you p +All projects use the same [appium capabilities files](config/appium.capabilities.json). ## Running Tests From ccfaeed72508aaf5985fa65824771b092f41cf5c Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Thu, 26 Apr 2018 13:43:31 +0300 Subject: [PATCH 4/4] chore: update appium config --- e2e/config/appium.capabilities.json | 48 ++++++++--------------------- 1 file changed, 13 insertions(+), 35 deletions(-) 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 } }