Skip to content
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

[DDW-617] Move all tests into same folder #1378

Merged
merged 20 commits into from
Apr 9, 2019

Conversation

DominikGuzei
Copy link
Member

@DominikGuzei DominikGuzei commented Apr 8, 2019

This PR refactors and simplifies our test setup:

  • All acceptance tests (unit & end-to-end) are in the features folder
  • The support folder was renamed to features/tests and contains two sub-folders e2e/unit for the respective test implementations … (no steps are shared atm)
  • End-to-end tests have the tag @e2e and unit tests @unit
  • They are run separately to keep unit tests blazing fast (0.006 seconds atm)
  • Test commands reduced to:
    • yarn test (build + run all unit and ui tests)
    • yarn test:unit run all unit tests (those tagged with @unit)
    • yarn test:unit:watch only run unit tests with @unit and @watch tags and rerun on file changes
    • yarn test:e2e run all UI tests (app is not built before!)
    • yarn test:e2e:watch only run tests with @e2e and @watch tags (app is built and in watch mode) reruns tests when files change

What to test

No QA necessary: Nothing has changed in functionality of the app - only the test setup was refactored.


Review Checklist

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • 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)
  • 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)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

@DominikGuzei DominikGuzei changed the title Chore/ddw 617 move all tests into same folder [DDW-617] Move all tests into same folder Apr 8, 2019
@thedanheller
Copy link
Contributor

I am reviewing this PR

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

@DominikGuzei excellent work!
Can you please add the CHANGELOG entry?
Also, I would like to ask you to update the "testing" README file: https://github.com/input-output-hk/daedalus/blob/chore/ddw-617-move-all-tests-into-same-folder/features/README.md
Thanks!

@thedanheller
Copy link
Contributor

@DominikGuzei:

$ yarn test:unit:unbound --tags @mnemonics
yarn run v1.9.4
error Command "test:unit:unbound" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@nikolaglumac
Copy link
Contributor

@daniloprates that test is added in a different PR: #1379

@DominikGuzei
Copy link
Member Author

@daniloprates that description was a mistake 😉 i updated the wrong PR description

…tests-for-mnemonics

[DDW-614] Add unit tests for mnemonics
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

As agreed on our weekly call, we need to rename ui to e2e tests 🙏

@DominikGuzei DominikGuzei removed the WIP label Apr 9, 2019
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Nice work @DominikGuzei - thanks!

@nikolaglumac nikolaglumac merged commit 154d354 into develop Apr 9, 2019
@iohk-bors iohk-bors bot deleted the chore/ddw-617-move-all-tests-into-same-folder branch April 9, 2019 10:25
@darko-mijic darko-mijic mentioned this pull request Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants