Skip to content

Conversation

@bznein
Copy link
Collaborator

@bznein bznein commented Oct 1, 2025

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

@bznein bznein force-pushed the testAndroid branch 4 times, most recently from a187051 to 0201e65 Compare October 2, 2025 08:25
@bznein bznein marked this pull request as ready for review October 2, 2025 08:38
@bznein bznein requested a review from thisconnect October 2, 2025 08:38
@bznein bznein changed the title [WIP - Do Not Review Yet] tests: enable automatic tests on Android. tests: enable automatic tests on Android. Oct 2, 2025
Copy link
Collaborator

@thisconnect thisconnect left a comment

Choose a reason for hiding this comment

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

🙏 untested LGTM

With a few suggestions. It would be good to get a 2nd review from somebody else

if (driver) await driver.deleteSession();
});

it("App main page loads", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@bznein bznein force-pushed the testAndroid branch 6 times, most recently from 126bca2 to d582b04 Compare October 6, 2025 11:56
@bznein bznein requested a review from thisconnect October 13, 2025 08:21
@thisconnect
Copy link
Collaborator

It took me a while to realize that this is in frontends/tests and why and when we use frontends/web/tests

Could you add a README.md to frontends/tests with some info what this is about so new devs can understand more easily?

@bznein
Copy link
Collaborator Author

bznein commented Oct 15, 2025

I added some docs; I also plan to spend today and tomorrow improving documentation around tests in general, so I will add a note to frontends/web/tests as well to complement this one. Ready for another review @thisconnect

Copy link
Collaborator

@thisconnect thisconnect left a comment

Choose a reason for hiding this comment

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

untested LGTM

deferring to @benma as I am not soo familiar with CI/bash-script stuff.

runs-on: ubuntu-latest
strategy:
matrix:
api-level: [30, 31, 33, 34, 35]
Copy link
Contributor

Choose a reason for hiding this comment

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

32 missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking of only targeting API that were introduced with new Android versions, so I skipped 32 (which is part of Android 12 like level 31) but I changed it now

'appium:deviceName': 'Android Emulator',
'appium:automationName': 'UiAutomator2',
'appium:app': './apk/app-debug.apk',
'appium:noReset': true,
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean? Isn't it better to have a fresh state for each test? Maybe add some comments about what assumptions the tests should make in the README

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

YEah you are probably right, I made many trial and error and I could have some leftover code that can be cleaned. I'll try without this flag and update the README if needed


# --- Run tests ---
npm run test
TEST_STATUS=$?
Copy link
Contributor

Choose a reason for hiding this comment

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

If npm run test fails, doesn't the script abort due to set -e before we even get here?

If you did this so appium is killed on failure too, you could use trap instead:

set -e
npx appium ... &
APPIUM_PID=$!
trap 'kill -9 $APPIUM_PID' EXIT
...

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this true?

If npm run test fails, doesn't the script abort due to set -e before we even get here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry that's weird, I could swear I pushed a change to this line that addresses it, and you are right, no clue what I have done instead... I will push a change asap

- name: Install Appium & drivers
run: |
npm install -g appium
Copy link
Contributor

Choose a reason for hiding this comment

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

In run.sh you use npx, so it's a different appium installation (locally managed by npx) that ends up being used. Unless I misunderstand, either this global installation is not needed, or the use of npx is not needed.

Also, should/can the version of appium be fixed, or is it preferable if it just always uses the latest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

YEah I think both points make sense, I changed from npx to just appium and pinned to the current latest version

@bznein bznein force-pushed the testAndroid branch 3 times, most recently from 61cee9d to bb1e156 Compare October 22, 2025 10:35
@bznein bznein requested a review from benma October 22, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants