Skip to content

chore(docs): Add readme.md for e2e projects #1300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 50 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
@@ -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 `<page-router-outlet>` and `<router-outlet>`.

- [`single-page`](single-page) - Tests for angular router and navigation. This is a simple app with only one level navigation using `<router-outlet>`.

- [`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) `<page-router-outlet>` 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add instructions/docs link for creating new emulator here?


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
```
48 changes: 13 additions & 35 deletions e2e/config/appium.capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,66 @@
"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",
"platformVersion": "4.4",
"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",
"platformVersion": "5.0",
"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",
"platformVersion": "6.0",
"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",
"platformVersion": "7.0",
"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",
"platformVersion": "7.1",
"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",
Expand All @@ -86,54 +72,46 @@
"avd": "Emulator-Api26-Google",
"lt": 60000,
"automationName": "UIAutomator2",
"appActivity": "com.tns.NativeScriptActivity",
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
"fullReset": false
},
"android27": {
"platformName": "Android",
"platformVersion": "27",
"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
}
}