Skip to content

Ensure the CI is marked as failed when Maestro test is failing #4700

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 9 commits into from
May 15, 2025

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented May 9, 2025

Content

  1. Ensure that the CI will complain that Maestro fails.
  2. Fix existing issues on Maestro tests, not detected due to the first point
  3. Add test on Element Call, to ensure that starting a call in a room will not crash the application.

Motivation and context

Fix Maestro, add more test, and secure releases

Screenshots / GIFs

Tests

  • Happy CI
  • Run maestro locally should work too

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

Copy link
Contributor

github-actions bot commented May 9, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/uTsUyo

Copy link

codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.11%. Comparing base (5ed2e92) to head (f7240ca).
Report is 30 commits behind head on develop.

Files with missing lines Patch % Lines
.../libraries/androidutils/browser/ChromeCustomTab.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4700   +/-   ##
========================================
  Coverage    80.11%   80.11%           
========================================
  Files         2126     2126           
  Lines        56303    56303           
  Branches      7021     7021           
========================================
  Hits         45107    45107           
  Misses        8780     8780           
  Partials      2416     2416           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty bmarty added the PR-Build For changes related to build, tools, CI/CD label May 9, 2025
@bmarty bmarty marked this pull request as ready for review May 9, 2025 13:25
@bmarty bmarty requested a review from a team as a code owner May 9, 2025 13:25
@bmarty bmarty requested review from jmartinesp and removed request for a team May 9, 2025 13:25
@@ -53,7 +53,7 @@ fun Activity.openUrlInChromeCustomTab(
// Disable download button
intent.putExtra("org.chromium.chrome.browser.customtabs.EXTRA_DISABLE_DOWNLOAD_BUTTON", true)
// Disable bookmark button
intent.putExtra("org.chromium.chrome.browser.customtabs.EXTRA_DISABLE_START_BUTTON", true)
intent.putExtra("org.chromium.chrome.browser.customtabs.EXTRA_DISABLE_STAR_BUTTON", true)
Copy link
Member Author

@bmarty bmarty May 9, 2025

Choose a reason for hiding this comment

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

I also spot this typo while looking if we could disable the option to minify the ChromeTab during Oidc login, but it appears that it's not possible.

image

Minimized tab does not make any sense here:

image

EDIT: EXTRA_DISABLE_STAR_BUTTON does not seem to have any effect... But not a big deal.

@bmarty
Copy link
Member Author

bmarty commented May 9, 2025

With the latest commit we arrive to this step:

image

But the test does not go further on the CI.

@bmarty
Copy link
Member Author

bmarty commented May 12, 2025

With d400644 the emulator is stuck on:

image

Reverting this commit.

@bmarty
Copy link
Member Author

bmarty commented May 15, 2025

@jmartinesp I think we can (review and) merge this PR and let the action Maestro (local) / Maestro test suite (pull_request) not be mandatory temporarily. At least the PR make the action to fail and fix the issues in case we want to run Maestro locally, that we may want to do before each release until the CI is fixed.

I'll try in another PR to use our action runner to see if it's working better.

WDYT?

@jmartinesp
Copy link
Member

Since Maestro is already broken I don't see any harm on merging this: even if it doesn't solve the problem with the webview in the CI, it's a good first step. If you think it's ready to review I can take a look 👍 .

@jmartinesp
Copy link
Member

jmartinesp commented May 15, 2025

I was trying to test this locally and it failed at some random point (probably a fluke) but when I restarted the flow the browser still had the MAS credentials so the 'enter credentials' sub-flow was no longer working. I think we may want to either take that into account with another when condition or maybe also crear the browser's data if possible.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

I was able to complete the flow locally, so I only have a couple of suggestions. Thanks!

@@ -7,22 +7,17 @@ appId: ${MAESTRO_APP_ID}
- runFlow: ../assertions/assertLoginDisplayed.yaml
- tapOn:
id: "login-continue"
## MAS page
Copy link
Member

Choose a reason for hiding this comment

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

Should we maybe add some comments here to remind us this is not working at the moment?

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -8,6 +8,11 @@ appId: ${MAESTRO_APP_ID}
- tapOn:
id: "login-continue"
## MAS page
- runFlow:
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a comment to specify this is a workaround for Chrome's onboarding screen.

Copy link
Member Author

Choose a reason for hiding this comment

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

@bmarty
Copy link
Member Author

bmarty commented May 15, 2025

I was trying to test this locally and it failed at some random point (probably a fluke) but when I restarted the flow the browser still had the MAS credentials so the 'enter credentials' sub-flow was no longer working. I think we may want to either take that into account with another when condition or maybe also crear the browser's data if possible.

I also faced this problem. You need to sign out (manually) on the MAS page during the flow. This is not ideal, but should be OK on the CI with a flushed emulator...

@bmarty bmarty merged commit 38ad415 into develop May 15, 2025
24 checks passed
@bmarty bmarty deleted the feature/bma/maestro branch May 15, 2025 15:14
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Build For changes related to build, tools, CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants