-
Notifications
You must be signed in to change notification settings - Fork 105
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
chore(test): clean integration test suite #164
chore(test): clean integration test suite #164
Conversation
605e437
to
512b21d
Compare
This commit cleans up the application's integration test suite in several ways: 1. Ensure all tests using UUIDs are using `node-uuid`, and ensuring they are using it properly (`uuid.v4()` over `uuid()`). 2. Removes extraneous comments. 3. Transitions many modules to using test helpers exclusively. Removes the `errorKeys` property from the test helpers -- all errors should be caught via `helpers.api.errored()`. The goal is to have cleaner, more maintainable tests for developers to use as references when writing future integration tests.
To improve performance, we are logging the agent used in the helpers in once before the test suite instead of before each request. This reduces the overall number of requests, allows cleaner logs, and reduces the overall testing time.
512b21d
to
060cdce
Compare
I am happy to notice that, you deleted used test files The integration test was difficult at the beginning because every one was supposed to learn the API, but now every one is so quick, and the same situation is observable for the end to end test, it is so difficult but every one will be quick with the time. You introduces new interfaces to the So I want to know, since this change will affect the productivity of every one :
e.g :
with helpers api
4.. Why some files are not entirely covered by the change, e.g |
Motivation The helper methods were developed to allow our team to focus on testing situations, rather than simply writing lots of code. Since most APIs behave the same (all return JSON encoding, create statements should send back either an ID or a UUID, etc...), it makes sense to move these checks into a place they can be used easily and frequently. No, I did not discuss it with the team. That discussion is free to happen here. There are many times when I've created issues that are never read by @IMA-WorldHealth/local-contributors , so I am experimenting with new ways to show my ideas. Of course generic methods will not be enough to replace specific cases. Our development team should still be thinking about, and writing specific tests. This just helps write common tests faster. Some files are not entirely covered because I didn't get around to completing them. It is evident that these types of changes are not appreciated. So, I am closing this pull request. |
This commit refactors the complex vouchers convention payment tool to import all debtor groups -- since the client has no way of setting the `is_convention` flag. A minor bug was fixed where the form was not set to `$pristine` after completing the payment.
This commit cleans up the application's integration test suite in
several ways:
node-uuid
, and ensuringthey are using it properly (
uuid.v4()
overuuid()
).the
errorKeys
property from the test helpers -- all errors should becaught via
helpers.api.errored()
.The goal is to have cleaner, more maintainable tests for developers to
use as references when writing future integration tests.