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

chore: add e2e tests for transaction summary operations #2931

Merged
merged 11 commits into from
Sep 3, 2024

Conversation

maschad
Copy link
Member

@maschad maschad commented Aug 14, 2024

Summary

Introduces some e2e tests in the fuel-gauge test suite to ensure the operations and transaction summaries are correctly assembled for various types of transactions.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@maschad maschad self-assigned this Aug 14, 2024
@github-actions github-actions bot added the chore Issue is a chore label Aug 14, 2024
@maschad maschad changed the title chore: add some e2e tests for transaction summary operations chore: add e2e tests for transaction summary operations Aug 14, 2024
@maschad maschad requested a review from Torres-ssf August 21, 2024 18:59
@maschad maschad marked this pull request as ready for review August 21, 2024 18:59
@maschad maschad force-pushed the mc/chore/add-integration-tests-operations branch from 2acfe42 to 090eaec Compare August 21, 2024 19:00
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
create-fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 4:10pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 4:10pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
create-fuels-counter-example ⬜️ Ignored (Inspect) Sep 3, 2024 4:10pm
create-fuels-template-preview ⬜️ Ignored (Inspect) Sep 3, 2024 4:10pm

Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

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

This PR closes the issue, however, the description says:

Introduces some e2e tests in the fuel-gauge test suite to ensure the operations and transaction summaries are correctly assembled for various types of transactions.

  • Should we be migrating all these tests over?
  • Should we remove the unit tests that have been migrated?

@maschad
Copy link
Member Author

maschad commented Aug 30, 2024

  • Should we be migrating all these tests over?

To the best of my knowledge, all the possible scenarios for the transaction operations are now covered so there is no further tests to be added.

  • Should we remove the unit tests that have been migrated?

This is debatable, one perspective would say that the e2e tests cover the correctness of all the unit tests, and therefore yes they should be removed. My opinion is that they should remain (for now) as they are useful for faster debugging (although the drawback is that refactors are slower)

@nedsalk of course has a lot of thoughts on this. I think the ideal compromise is that delay removing them until we refactor the respective functions.

packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
packages/fuel-gauge/src/transaction-summary.test.ts Outdated Show resolved Hide resolved
@maschad maschad enabled auto-merge (squash) September 3, 2024 16:06
Copy link
Contributor

github-actions bot commented Sep 3, 2024

Coverage Report:

Lines Branches Functions Statements
79.52%(+0%) 72.04%(+0.03%) 78.04%(+0%) 79.62%(+0%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 88.48%
(+0%)
79.71%
(+1.45%)
84%
(+0%)
88.73%
(+0%)

@maschad maschad merged commit b6b83f4 into master Sep 3, 2024
23 checks passed
@maschad maschad deleted the mc/chore/add-integration-tests-operations branch September 3, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Integration Tests For Get Operations
4 participants