Skip to content

Integration tests: simple send-tx, send-tx, create-tokens, mint and melt tokens #152

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

Merged
merged 47 commits into from
Mar 17, 2022

Conversation

tuliomir
Copy link
Contributor

@tuliomir tuliomir commented Mar 8, 2022

This pull request is the second phase of the implementation of Integration Tests on the Hathow Wallet Headless, and expands the scope of #149 .

Changes on previous tests:

  • The wallets are now instantiated all at once on the WalletHelper.startMultipleWalletsForTest() method. This is a performance improvement, since wallet initialization is the most time-consuming process on the integration tests.
  • Genesis wallet initialization was removed from the setupTests-integration.js:beforeAll() method to use the process above.

An effort was made to make the tests use as little transactions as possible, since transactions are the second slowest process on the tests. As the integration tests use Jest's --runInBand configuration, it became possible to use one test's resulting condition as precondition to the next tests.

Sometimes this may compromise the readability of the testing code, but it was a tradeoff for performance.

Acceptance Criteria

  • Run the integration tests on the following routes:
    • /wallet/simple-send
    • /wallet/send-tx
    • /wallet/create-tokens
    • /wallet/mint-tokens
    • /wallet/melt-tokens

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@tuliomir tuliomir self-assigned this Mar 8, 2022
@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #152 (02d690b) into dev (a8151b2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #152   +/-   ##
=======================================
  Coverage   81.03%   81.03%           
=======================================
  Files           7        7           
  Lines         464      464           
  Branches      103      103           
=======================================
  Hits          376      376           
  Misses         80       80           
  Partials        8        8           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8151b2...02d690b. Read the comment docs.

@lgtm-com
Copy link

lgtm-com bot commented Mar 8, 2022

This pull request introduces 1 alert when merging 9416f88 into a8151b2 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@tuliomir tuliomir changed the title Integration tests: Integration tests: simple send-tx, send-tx, create-tokens, mint and melt tokens Mar 8, 2022
@tuliomir tuliomir requested a review from andreabadesso March 9, 2022 00:00
@tuliomir tuliomir marked this pull request as ready for review March 9, 2022 00:00
@tuliomir tuliomir requested a review from pedroferreira1 as a code owner March 9, 2022 00:00
This operation should be explicit whenever an operation to get balance
is to be done.
@tuliomir tuliomir mentioned this pull request Mar 15, 2022
3 tasks
These todos should be reviewed together with the skipped tests on a
future issue
also, they are now editable via environment variables
@pedroferreira1 pedroferreira1 self-requested a review March 16, 2022 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants