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

Bug 1876720 - Add more test logs to ComposeTabDrawerRobot #5315

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 ComposeTabDrawerRobot

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=1876720

@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 13:10
@AndiAJ AndiAJ self-assigned this Jan 26, 2024
@github-actions github-actions bot removed the work in progress Not ready to land yet. Work in progress (WIP). label Jan 26, 2024
@AndiAJ AndiAJ requested a review from sv-ohorvath January 26, 2024 13:11
@github-actions github-actions bot added the 🕵️‍♀️ needs review PRs that need to be reviewed label Jan 26, 2024
@AndiAJ AndiAJ requested a review from jjSDET January 26, 2024 13:11
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

for future follow-up:

let's start consolidating our methods that only do one or two things into methods like

fun mozClick(element: <EspressoSelector>): {
        Log.i(TAG, "Waiting for \"$element\" to exist...")
        element.waitFor(element)
        Log.i(TAG, "\"$element\" found! Clicking \"$element\"...)
        return self
}

Note the use of self here.

with all of our methods, when we use that we'll be able to chain them together like

mozClick(element).Transition()

That way, over time, well ony have one command for handling our custom commands or actions like click. In this case we're starting by adding more logging to each command, but we'll add more as we go.

Because we'll be chaining all of our methods, you maintain context of it's use, making them simple enough to read and understand that toggleToPrivateTabs is happening, but with toggle(To: PrivateTabs).mozClick(privateBrowsingButton).

@AndiAJ AndiAJ force-pushed the composeTabDrawerRobot branch from 0cbe28a to db9ccf8 Compare January 30, 2024 11:04
@AndiAJ AndiAJ added 🛬 needs landing PRs that are ready to land and removed 🕵️‍♀️ needs review PRs that need to be reviewed labels Jan 30, 2024
@github-actions github-actions bot added the approved PR that has been approved label Jan 30, 2024
@mergify mergify bot merged commit 197dadf into mozilla-mobile:main Jan 30, 2024
23 checks passed
@AndiAJ AndiAJ deleted the composeTabDrawerRobot branch January 30, 2024 11:45
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