Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit cfc0a57

Browse files
authored
docs(CONTRIBUTING): update guide to add info about running e2e tests (#424)
1 parent 65a9cfe commit cfc0a57

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

CONTRIBUTING.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,36 @@ The repository contains several ingredients:
5757
The last command also runs `npm prepare` which compiles the TypeScript files in the plugin.
5858
You are good to go! You're strongly encouraged to follow the official NativeScript [Coding Conventions](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md) and to use ES features available in NodeJS v6. If unsure, check on [node.green](http://node.green/).
5959
60-
## Testing locally
60+
## Testing locally by running e2e tests
6161
62-
There are three apps in the repository, located in the `/demo` directory.
63-
1. Create a new NativeScript project with NativeScript CLI:
62+
NOTE: There are three test apps in the repository, located in the `/demo` directory. The steps below describe how to run the tests for the `AngularApp`, but the same approach can be used to run any other `e2e` tests.
63+
64+
1. Navigate to `demo/AngularApp`
6465
``` bash
65-
tns create testapp # pass --ng/--tsc for Angular/TypeScript app
66+
cd demo/AngularApp
67+
```
68+
69+
2. Install dependencies. This also installs your local copy of the nativescript-angular plugin.
70+
``` bash
71+
npm install
6672
```
73+
3. Make sure to have an emulator set up or connect a physical Android/iOS device.
6774
68-
2. Install your local copy of the plugin.
75+
4. Build the app for Android or iOS
6976
``` bash
70-
npm install /path/to/repo/nativescript-dev-webpack
77+
tns run android/ios
7178
```
7279
73-
3. Make sure to force-update the project's configuration files if it's already using Webpack.
80+
5. Install [appium](http://appium.io/) globally.
81+
``` bash
82+
npm install -g appium
83+
```
84+
85+
6. Follow the instructions in the [nativescript-dev-appium](https://github.com/nativescript/nativescript-dev-appium#custom-appium-capabilities) plugin to add an appium capability for your device inside `./e2e/renderer/e2e/config/appium.capabilities.json`.
86+
87+
7. Run the automated tests. The value of the `runType` argument should match the name of the capability that you just added.
7488
``` bash
75-
./node_modules/.bin/update-ns-webpack --deps --configs
89+
npm run e2e -- --runType capabilityName
7690
```
7791
7892
## Reporting Bugs

0 commit comments

Comments
 (0)