Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Replace BrowserAwesomeBar (browser-awesomebar) with AwesomeBar composable (compose-awesomebar) #21172

Closed
pocmo opened this issue Sep 7, 2021 · 5 comments
Assignees
Labels

Comments

@pocmo
Copy link
Contributor

pocmo commented Sep 7, 2021

A while ago we integrated the AwesomeBar() composable into Focus. Now, after mozilla-mobile/android-components#10922, we are ready to integrate it into Fenix too. I would like to land this change at the beginning of the 94 Nightly cycle.

┆Issue is synchronized with this Jira Task

@pocmo pocmo self-assigned this Sep 7, 2021
@github-actions github-actions bot added the needs:triage Issue needs triage label Sep 7, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 8, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 8, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 10, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 10, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 10, 2021
AndiAJ pushed a commit to AndiAJ/fenix that referenced this issue Sep 22, 2021
AndiAJ pushed a commit to AndiAJ/fenix that referenced this issue Sep 22, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 22, 2021
pocmo added a commit to pocmo/fenix that referenced this issue Sep 22, 2021
@AaronMT
Copy link
Contributor

AaronMT commented Sep 22, 2021

@pocmo with the above commit do you know how we can re-enable toggleSearchSuggestions in SmokeTest.kt as it was previously waiting on network search suggestions with this custom assertion in an idling resource that was removed above https://github.com/mozilla-mobile/fenix/blob/6d99c34f1206ad3be0ee89b775b3a77526a991c9/app/src/androidTest/java/org/mozilla/fenix/helpers/assertions/AwesomeBarAssertion.kt as it was previously using import mozilla.components.browser.awesomebar.BrowserAwesomeBar – possible to revert this and update it?

pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this issue Sep 24, 2021
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this issue Sep 24, 2021
@pocmo
Copy link
Contributor Author

pocmo commented Sep 27, 2021

@AaronMT This is still an issue, right? I think there's a way to get the suggestion count. I'll take a look.

@AaronMT
Copy link
Contributor

AaronMT commented Sep 27, 2021

Andi is using a workaround in #21517

@pocmo
Copy link
Contributor Author

pocmo commented Sep 29, 2021

@AaronMT In mozilla-mobile/android-components#11050 I am adding a tag to every suggestion (mozac.awesomebar.suggestion). With that I am able to find and count the suggestions:

    fun ComposeTestRule.countSuggestions(): Int {
        val nodes = onAllNodesWithTag("mozac.awesomebar.suggestion")
        val matchedNodes = nodes.fetchSemanticsNodes(
            atLeastOneRootRequired = false
        )
        return matchedNodes.size
    }

And can also wait for them to appear:

    fun ComposeTestRule.waitForSuggestions(timeoutMillis: Long = 1_000) {
        waitUntil(timeoutMillis) {
            countSuggestions() > 0
        }
    }

I guess that should work from an idle resource too, if we pass the ComposeTestRule to it.

@pocmo
Copy link
Contributor Author

pocmo commented Sep 29, 2021

Closing the issue since the integration PR already landed.

@pocmo pocmo closed this as completed Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants