Skip to content

Commit aef51c0

Browse files
Alexander Vakrilovsis0k0
Alexander Vakrilov
authored andcommitted
chore(docs): add readme.md for e2e projects (#1300)
1 parent df11448 commit aef51c0

File tree

3 files changed

+67
-35
lines changed

3 files changed

+67
-35
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ This repository contains the code for integration of NativeScript with Angular.
2525
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:
2626

2727
* [Hello world starter](https://github.com/NativeScript/template-hello-world-ng)
28+
* [Master-detail template](https://github.com/NativeScript/template-master-detail-ng)
29+
* [Drawer navigation template](https://github.com/NativeScript/template-drawer-navigation-ng)
30+
* [TabView navigation template](https://github.com/NativeScript/template-tab-navigation-ng)
31+
* [NativeScript Angular SDK examples](https://github.com/NativeScript/nativescript-sdk-examples-ng)
2832
* [TodoMVC sample implementation](https://github.com/NativeScript/sample-ng-todomvc)
2933

3034
## Contribute

Diff for: e2e/README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# NativeScript Angular E2E Tests
2+
3+
This folder contains a number of projects containing e2e tests for NativeScript Angular integration.
4+
5+
## Projects Description
6+
7+
- [`renderer`](renderer) - Tests for the nativescript-angular renderer features. Creating/adding/removing elements for the nativescript visual tree.
8+
9+
- [`router`](router) - Tests for angular router and navigation. This app contains a mixed scenario with `<page-router-outlet>` and `<router-outlet>`.
10+
11+
- [`single-page`](single-page) - Tests for angular router and navigation. This is a simple app with only one level navigation using `<router-outlet>`.
12+
13+
- [`modal-navigation-ng`](modal-navigation-ng) - Tests for different scenarios of showing and navigation in modal dialogs.
14+
15+
- [`router-tab-view`](router-tab-view) - Tests for navigation in a TabComponent containing named(aux) `<page-router-outlet>` instances.
16+
17+
## Global Appium Setup
18+
19+
Install external dependencies for nativescript-dev-appium described [here](https://github.com/NativeScript/nativescript-dev-appium#setup).
20+
21+
22+
All projects use the same [appium capabilities files](config/appium.capabilities.json).
23+
24+
25+
## Running Tests
26+
27+
Make sure you build or run the project with the NativeScript CLI first:
28+
```
29+
tns build android
30+
tns run ios
31+
```
32+
33+
Run appium tests with the `e2e` npm task. Check ns-dev-appium options [here](https://github.com/NativeScript/nativescript-dev-appium#options)
34+
35+
Examples:
36+
37+
```
38+
npm run e2e -- --runType android23
39+
40+
npm run e2e -- --runType sim.iPhone8.iOS112
41+
```
42+
43+
For **development** you can use `--devMode` flag to reuse the current emulator and the currently installed application:
44+
45+
Examples:
46+
```
47+
npm run e2e -- --runType android23 --devMode
48+
49+
npm run e2e -- --runType sim.iPhone8.iOS112 --devMode
50+
```

Diff for: e2e/config/appium.capabilities.json

+13-35
Original file line numberDiff line numberDiff line change
@@ -4,80 +4,66 @@
44
"platformVersion": "4.4",
55
"deviceName": "test",
66
"lt": 60000,
7-
"appActivity": "com.tns.NativeScriptActivity",
87
"newCommandTimeout": 720,
98
"noReset": true,
10-
"fullReset": false,
11-
"app": ""
9+
"fullReset": false
1210
},
1311
"nexus5": {
1412
"browserName": "",
1513
"platformName": "Android",
1614
"platformVersion": "6.0",
1715
"deviceName": "device",
18-
"udid": "077e4a47003b7698",
19-
"appActivity": "com.tns.NativeScriptActivity",
20-
"app": ""
16+
"udid": "077e4a47003b7698"
2117
},
2218
"android19": {
2319
"platformName": "Android",
2420
"platformVersion": "4.4",
2521
"deviceName": "Emulator-Api19-Default",
2622
"avd": "Emulator-Api19-Default",
2723
"lt": 60000,
28-
"appActivity": "com.tns.NativeScriptActivity",
2924
"newCommandTimeout": 720,
3025
"noReset": false,
31-
"fullReset": false,
32-
"app": ""
26+
"fullReset": false
3327
},
3428
"android21": {
3529
"platformName": "Android",
3630
"platformVersion": "5.0",
3731
"deviceName": "Emulator-Api21-Default",
3832
"avd": "Emulator-Api21-Default",
3933
"lt": 60000,
40-
"appActivity": "com.tns.NativeScriptActivity",
4134
"newCommandTimeout": 720,
4235
"noReset": false,
43-
"fullReset": false,
44-
"app": ""
36+
"fullReset": false
4537
},
4638
"android23": {
4739
"platformName": "Android",
4840
"platformVersion": "6.0",
4941
"deviceName": "Emulator-Api23-Default",
5042
"avd": "Emulator-Api23-Default",
5143
"lt": 60000,
52-
"appActivity": "com.tns.NativeScriptActivity",
5344
"newCommandTimeout": 720,
5445
"noReset": false,
55-
"fullReset": false,
56-
"app": ""
46+
"fullReset": false
5747
},
5848
"android24": {
5949
"platformName": "Android",
6050
"platformVersion": "7.0",
6151
"deviceName": "Emulator-Api24-Default",
6252
"avd": "Emulator-Api24-Default",
6353
"lt": 60000,
64-
"appActivity": "com.tns.NativeScriptActivity",
6554
"newCommandTimeout": 720,
6655
"noReset": false,
67-
"fullReset": false,
68-
"app": ""
56+
"fullReset": false
6957
},
7058
"android25": {
7159
"platformName": "Android",
7260
"platformVersion": "7.1",
7361
"deviceName": "Emulator-Api25-Google",
7462
"avd": "Emulator-Api25-Google",
7563
"lt": 60000,
76-
"appActivity": "com.tns.NativeScriptActivity",
7764
"newCommandTimeout": 720,
7865
"noReset": false,
79-
"fullReset": false,
80-
"app": ""
66+
"fullReset": false
8167
},
8268
"android26": {
8369
"platformName": "Android",
@@ -86,54 +72,46 @@
8672
"avd": "Emulator-Api26-Google",
8773
"lt": 60000,
8874
"automationName": "UIAutomator2",
89-
"appActivity": "com.tns.NativeScriptActivity",
9075
"newCommandTimeout": 720,
9176
"noReset": false,
92-
"fullReset": false,
93-
"app": ""
77+
"fullReset": false
9478
},
9579
"android27": {
9680
"platformName": "Android",
9781
"platformVersion": "27",
9882
"deviceName": "Emulator-Api27-Google",
9983
"avd": "Emulator-Api27-Google",
10084
"lt": 60000,
101-
"appActivity": "com.tns.NativeScriptActivity",
10285
"newCommandTimeout": 720,
10386
"noReset": true,
104-
"fullReset": false,
105-
"app": ""
87+
"fullReset": false
10688
},
10789
"sim.iPhone7.iOS100": {
10890
"platformName": "iOS",
10991
"platformVersion": "10.0",
11092
"deviceName": "iPhone 7 100",
11193
"noReset": true,
112-
"fullReset": false,
113-
"app": ""
94+
"fullReset": false
11495
},
11596
"sim.iPhone7.iOS110": {
11697
"platformName": "iOS",
11798
"platformVersion": "11.2",
11899
"deviceName": "iPhone 7 110",
119100
"noReset": true,
120-
"fullReset": false,
121-
"app": ""
101+
"fullReset": false
122102
},
123103
"sim.iPhone8.iOS112": {
124104
"platformName": "iOS",
125105
"platformVersion": "11.2",
126106
"deviceName": "iPhone 8 112",
127107
"noReset": true,
128-
"fullReset": false,
129-
"app": ""
108+
"fullReset": false
130109
},
131110
"sim.iPhoneX.iOS110": {
132111
"platformName": "iOS",
133112
"platformVersion": "11.2",
134113
"deviceName": "iPhone X 110",
135114
"noReset": true,
136-
"fullReset": false,
137-
"app": ""
115+
"fullReset": false
138116
}
139117
}

0 commit comments

Comments
 (0)