Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Bug 1876700 - Add more test logs to CollectionRobot #5313

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

AndiAJ
Copy link
Contributor

@AndiAJ AndiAJ commented Jan 26, 2024

Summary:

  • As part of the Android test hardening, to ease the debugging process, I've added test logs to the CollectionRobot
  • Also converted the private variables to functions so they don't get initialized
  • Removed unused functions
  • Use where applicable the functions from the MatcherHelper to avoid adding unnecessary logs
  • ❗There is this verifySnackBarText function which actually doesn't assert anything, only waits for an item containing text.
    Will do a separate refactoring related to these snackbar verifications as we have a function in TestHelper which is only partially used in the project and have a couple more individual functions named as verifySnackBarTextin different robots

Pull Request checklist

  • Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry or does not need one
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Breaking Changes: If this is a breaking Android Components change, please push a draft PR on Reference Browser to address the breaking issues.

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-apk-{fenix,focus,klar}-debug task you're interested in.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

https://bugzilla.mozilla.org/show_bug.cgi?id=1876700

@github-actions github-actions bot added the work in progress Not ready to land yet. Work in progress (WIP). label Jan 26, 2024
@AndiAJ AndiAJ marked this pull request as ready for review January 26, 2024 10:53
@AndiAJ AndiAJ requested review from sv-ohorvath and jjSDET January 26, 2024 10:53
@AndiAJ AndiAJ self-assigned this Jan 26, 2024
@github-actions github-actions bot added 🕵️‍♀️ needs review PRs that need to be reviewed and removed work in progress Not ready to land yet. Work in progress (WIP). labels Jan 26, 2024
}

fun verifyTabSavedInCollection(title: String, visible: Boolean = true) {
if (visible) {
scrollToElementByText(title)
Log.i(TAG, "verifyTabSavedInCollection: Scrolled to: $title saved tab")
Copy link
Contributor

Choose a reason for hiding this comment

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

As this is a custom function, you could actually add a log inside the scroll function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done !

Copy link
Contributor

@sv-ohorvath sv-ohorvath left a comment

Choose a reason for hiding this comment

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

Approved, with one single comment.

@github-actions github-actions bot added approved PR that has been approved and removed 🕵️‍♀️ needs review PRs that need to be reviewed labels Jan 26, 2024
Copy link
Contributor

@jjSDET jjSDET left a comment

Choose a reason for hiding this comment

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

lgtm

@AndiAJ AndiAJ added the 🛬 needs landing PRs that are ready to land label Jan 30, 2024
@mergify mergify bot merged commit 4ec3fd1 into mozilla-mobile:main Jan 30, 2024
23 checks passed
@AndiAJ AndiAJ deleted the collectionRobot branch January 30, 2024 11:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved PR that has been approved 🛬 needs landing PRs that are ready to land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants