test(e2e): add modal-navigation app (#5393)

* chore(apps): add modal-navigation-app for ui testing

* test(e2e): add modal-navigation app

* test(apps): remove modal-navigation-app

The app has been moved to `e2e/modal-navigation`.

* chore: include e2e folder to npm scripts

* docs: include e2e folder to DevelopmentWorkflow.md

* chore(e2e): update .gitignore

* fix(e2e): relative paths

* chore(e2e): update package.json

* test(e2e): add change root view to modal-navigation

* test(e2e): set androidTabsPosition to botton

* chore(e2e): add VSCode launch.json config

* docs(e2e): delete LICENSE and README.md files

* refactor(e2e): rename modal-tab-page to modal-tab-root

* test(e2e): update iOS launch screen
This commit is contained in:
Manol Donev
2018-02-14 16:51:51 +02:00
committed by Vasil Chimev
parent 2edef3de3b
commit e1eea8efe7
86 changed files with 1083 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ Development Workflow
The repository contains several packages and apps:
- `tns-core-modules` - The core NativeScript TypeScript modules used to develop NativeScript apps.
- `apps` - UI app used for manual testing and automation.
- `e2e` - applications and *e2e* tests.
- `tests` - Unit tests app for the `tns-core-modules`.
- `tns-platform-declarations` - TypeScript definitions for Android and iOS native APIs.
@@ -18,6 +19,9 @@ Managing dependencies:
- `apps` depends on:
- `tns-platform-declarations`
- `tns-core-modules`
- `e2e` depends on:
- `tns-platform-declarations`
- `tns-core-modules`
- `tests` depends on:
- `tns-platform-declarations`
- `tns-core-modules`
@@ -26,22 +30,27 @@ Managing dependencies:
this dependency contains native code and is rarely modified so for now it remains outside this repo.
## Initial Setup
Clone (or fork/clone) the repo:
```bash
git clone https://github.com/NativeScript/NativeScript.git
```
Install devDependencies:
```bash
npm install
```
Run setup script. This will [`npm link`](https://docs.npmjs.com/cli/link) the `tns-core-modules` and `tns-core-modules-declarations` dependencies inside the `tests` and `apps` projects.
Run `setup` script. This will [`npm link`](https://docs.npmjs.com/cli/link) the `tns-core-modules` and `tns-core-modules-declarations` dependencies inside the `tests`, `apps` and `e2e` projects.
```bash
npm run setup
```
## TypeScript
The following commands are commonly used to compile the `tns-core-modules`:
```bash
# Full tsc with type checking ~22.2s.
@@ -55,18 +64,22 @@ tsc --skipLibCheck -w
```
The modules have `typescript` as a devDependency so you should also be able to use the locally installed TypeScript compiler from node_modules:
```bash
./node_modules/.bin/tsc
```
You can compile the TypeScript files in the `tns-core-modules`, `tns-platform-declarations`, `apps` and `tests` at once at the root of the repo:
You can compile the TypeScript files in the `tns-core-modules`, `tns-platform-declarations`, `apps`, `e2e` and `tests` at once at the root of the repo:
```bash
npm run tsc
```
## Running Unit Tests
The test app is an ordinary NativeScript app that logs the test results as it go.
After the [initial setup](#initial-setup) you can run the tests with:
```bash
# Make sure TypeScript is transpiled
tsc
@@ -91,6 +104,7 @@ tns run android --path apps
```
## Running Another App
The [initial setup](#initial-setup) will `npm-link` the `tns-core-modules` globally. You can use it in any local project:
```bash
@@ -101,25 +115,33 @@ npm link tns-core-modules
tns run ios
tns run android
```
>Note: You still have to rebuild the TypeScript if you have made changes in the code of the core-modules.
> Note: You still have to rebuild the TypeScript if you have made changes in the code of the core-modules.
## Platform declarations
To update the platform declarations (the ios.d.ts-es) you can run:
```
npm install
npm run dev-declarations
```
This script will update the iOS declarations. Android tools are not integrated yet.
The declarations are generated from the test app and will include the native code from tns-core-modules-widgets.
# Documentation API reference
The following will build the API reference pages in `bin/dist/apiref`:
```
npm run typedoc
```
If you want to improve on the documentation you can also build and start up dev web server:
```
npm run dev-typedoc
```
The terminal will point the address you can open in your web browsed.