From 8e3c798dbca40b2c4aba68707d6fac085e2e0fea Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Mon, 8 Apr 2019 17:16:10 +0200 Subject: [PATCH 1/2] [DDW-617] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af75c67f20..f1e4ead768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Changelog ### Chores +- Simplified the test setup ([PR 1378](https://github.com/input-output-hk/daedalus/pull/1378)) - Updated PR template ([PR 1376](https://github.com/input-output-hk/daedalus/pull/1376)) - Implemented new About Us dialog design with a close button ([PR 1369](https://github.com/input-output-hk/daedalus/pull/1369) - Refactored store async functions to use mobx runInAction calls ([PR 1367](https://github.com/input-output-hk/daedalus/pull/1367) From 5ea7ee3ade854f888595ffe6eabad15e02b2903c Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Mon, 8 Apr 2019 17:30:27 +0200 Subject: [PATCH 2/2] [DDW-617] update readme and pr template --- .github/pull_request_template.md | 16 ++++++++-------- features/README.md | 30 +++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e3bcf6d120..4f33dc46d1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,17 +25,17 @@ This PR CHANGES. - [ ] PR is updated to the most recent version of the target branch (and there are no conflicts) - [ ] PR has a good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes - [ ] CHANGELOG entry has been added to the top of the appropriate section (*Features*, *Fixes*, *Chores*) and is linked to the correct PR on GitHub -- [ ] Automated tests: All acceptance and unit tests are passing (`yarn run test` and `yarn run test:unit`) -- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *development* build (`yarn run dev`) -- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *production* build (`yarn run package` / CI builds) -- [ ] There are no *flow* errors or warnings (`yarn run flow:test`) -- [ ] There are no *lint* errors or warnings (`yarn run lint`) -- [ ] There are no *prettier* errors or warnings (`yarn run prettier:check`) -- [ ] There are no missing translations (running `yarn run manage:translations` produces no changes) +- [ ] Automated tests: All acceptance and unit tests are passing (`yarn test`) +- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *development* build (`yarn dev`) +- [ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in *production* build (`yarn package` / CI builds) +- [ ] There are no *flow* errors or warnings (`yarn flow:test`) +- [ ] There are no *lint* errors or warnings (`yarn lint`) +- [ ] There are no *prettier* errors or warnings (`yarn prettier:check`) +- [ ] There are no missing translations (running `yarn manage:translations` produces no changes) - [ ] Text changes are proofread and approved (Jane Wild / Amy Reeve) - [ ] Japanese text changes are proofread and approved (Junko Oda) - [ ] UI changes look good in all themes (Alexander Rukin) -- [ ] Storybook works and no stories are broken (`yarn run storybook`) +- [ ] Storybook works and no stories are broken (`yarn storybook`) - [ ] In case of dependency changes `yarn.lock` file is updated ### Code Quality diff --git a/features/README.md b/features/README.md index 9cc4290818..e7ae1a4944 100644 --- a/features/README.md +++ b/features/README.md @@ -2,30 +2,46 @@ Document maintainer: Nikola Glumac
Document status: Active
-# Running Daedalus acceptance tests - +# Install Daedalus 1. Make sure you have node and yarn installed on your machine 2. Clone Daedalus repository to your machine (`git clone git@github.com:input-output-hk/daedalus.git`) 3. Install dependencies from within Daedalus directory: ```bash -$ cd daedalus/ $ yarn install ``` -4. Build and run the backend (Cardano SL) following the instructions from [Daedalus](https://github.com/input-output-hk/daedalus/blob/master/README.md#development---with-cardano-wallet) README file. -5. Run Daedalus frontend tests: +# Run unit tests + +Make sure Daedalus is properly installed (see above). + +```bash +$ yarn test:unit +``` + +# Run UI tests + +1. Make sure Daedalus is properly installed (see above). +2. Build and run the backend (Cardano SL) following the instructions from [Daedalus](https://github.com/input-output-hk/daedalus/blob/master/README.md#development---with-cardano-wallet) README file. +3. Run Daedalus frontend tests: ```bash $ cd daedalus/ -$ nix-shell --arg autoStartBackend true --arg systemStart XXX # XXX = cardano system startup time +$ yarn nix:dev XXX # XXX = cardano system startup time +$ yarn build +$ yarn test:ui +``` + +# Run all tests + +```bash $ yarn test ``` Once tests are complete you will get a summary of passed/failed tests in the Terminal window. -## Keeping Daedalus Alive After Tests +## Keeping Daedalus Alive After UI Tests While working on the tests it's often useful to keep Daedalus alive after the tests have run (e.g: to inspect the app state). You can pass a special environment var to tell the test script