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

[e2e] Send ETH to an EOA using Ganache network on Android #6215

Merged
merged 8 commits into from
May 5, 2023

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Apr 19, 2023

Description
This PR adds an e2e testcase for Android with wdio/appium, using the Ganache network. The test is a Simple send flow to an EOA. For that, it's done the following:

  • A Confirmations folder has been created for including the android e2e tests related to Confirmations
  • A Confirmations suite has been created in order to run all confirmation related tests by using the flag --suite confirmations
  • A Ganache server will be started whenever we use Ganache server is started from common steps
  • The Ganache server will be stopped whenever we use Ganache server is stopped from common steps
  • Ganache sets 10000 ETH by default to the generated accounts given the seedphrase we pass it. This seedphrase is defined on Accounts.getValidAccount()
    • It seems that the envar MM_TEST_ACCOUNT_SRP is not working and not correctly set. For this reason, running local tests we can add a seedphrase, in case the envar does not work seedPhrase: process.env.MM_TEST_ACCOUNT_SRP || 'phrase upgrade clock rough situate wedding elder clever doctor stamp excess tent',. Seems this is related to issue 762

Manual testing steps

  • Connect an Android device to your computer / use simulator (see Android setup on readme)
    • You'll need to set the following vars
export ANDROID_HOME=/home/PATH_TO_ANDROID/Android/Sdk
export ANDROID_SDK_ROOT=/home/PATH_TO_ANDROID/Android/Sdk
  • Open a terminal
  • Expose the needed ports on your Android device
    • adb reverse tcp:8081 tcp:8081
    • adb reverse tcp:8545 tcp:8545 -- where ganache server runs
  • Create the QA build
    • yarn setup
    • yarn start:android:qa
  • Open another terminal
    • run yarn watch
  • On the first terminal run the specific testcase yarn test:wdio:android --spec wdio/features/Confirmations/SendEthEOA.feature
  • Notice you might need to add a seedphrase on the envar file and if it does not work, you can add it directly as indicated above

Screenshots/Recordings

Screenshot from 2023-04-19 10-56-53

android-ganache-send-eth.webm

Issue

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@seaona seaona requested a review from a team as a code owner April 19, 2023 09:46
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@seaona seaona self-assigned this Apr 19, 2023
@seaona seaona added team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-secure-ux-PR PR from the confirmations team and removed team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead labels Apr 19, 2023
wdio.conf.js Show resolved Hide resolved
Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

LGTM, some minor comments

Copy link
Member

@Andepande Andepande left a comment

Choose a reason for hiding this comment

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

LGTM

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.

This looks good to me 🌮 🌮

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.

minor comment

wdio/features/Confirmations/SendEthEOA.feature Outdated Show resolved Hide resolved
@seaona seaona merged commit 7f3fad8 into main May 5, 2023
@seaona seaona deleted the android-ganache branch May 5, 2023 07:52
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants