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

test: Refactor Advanced Gas fees test to utilize mocks #11927

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

SamuelSalas
Copy link
Member

Description

The advanced gas fees tests are becoming a bit unstable within the smoke pipeline mainly because we are relying on real funds (Sepolia ETH) to submit the transaction. With the recent addition of mocking, we should refactor the advanced gas fees tests to:

  • use ganache
  • mock the gas api to return expected values

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

SamuelSalas and others added 27 commits October 9, 2024 18:31
@SamuelSalas SamuelSalas requested review from a team as code owners October 21, 2024 18:59
@SamuelSalas SamuelSalas self-assigned this Oct 21, 2024
@SamuelSalas SamuelSalas added Run Smoke E2E Triggers smoke e2e on Bitrise Detox labels Oct 21, 2024
Copy link
Contributor

github-actions bot commented Oct 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 55bb507
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/37a986e5-50c5-4672-b317-c0e510916377

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

nice stuff! small feedback


class AmountView {
get currencySwitch() {
Copy link
Member

Choose a reason for hiding this comment

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

I recall we had a specific use case for this. Unfortunately, the test that used this test step was deleted

await AmountView.tapCurrencySwitch();
. We can work to add it back. Do not remove.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -26,9 +29,5 @@ class AmountView {
? await Gestures.typeTextAndHideKeyboard(this.amountInputField, amount)
: await Gestures.replaceTextInField(this.amountInputField, amount);
}

async tapCurrencySwitch() {
Copy link
Member

Choose a reason for hiding this comment

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

I recall we had a specific use case for this. Unfortunately, the test that used this test step was deleted

await AmountView.tapCurrencySwitch();
. We can work to add it back. Do not remove.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@SamuelSalas SamuelSalas requested a review from a team as a code owner October 21, 2024 20:44
@SamuelSalas SamuelSalas added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 21, 2024
Copy link
Contributor

github-actions bot commented Oct 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 48520e2
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9075e9d2-3ff0-4950-8917-8e8a495bb74d

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarcloud bot commented Oct 21, 2024

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