mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.49k stars 1.27k forks source link

Intermittent UI test failure - deleteCollectionTest - androidx.test.uiautomator.UiObjectNotFoundException #25970

Closed Archaeopteryx closed 2 years ago

Archaeopteryx commented 2 years ago

Firebase Test Run:

https://console.firebase.google.com/project/moz-fenix/testlab/histories/bh.80a1a071cfb2770e/matrices/5379394058481151477/executions/bs.1dbb94fa785585b/testcases/1

Stacktrace:

androidx.test.uiautomator.UiObjectNotFoundException: UiSelector[TEXT=VIEW, RESOURCE_ID=org.mozilla.fenix:id/snackbar_btn]
    at androidx.test.uiautomator.UiObject.click(UiObject.java:416)
    at org.mozilla.fenix.ui.robots.TabDrawerRobot.snackBarButtonClick(TabDrawerRobot.kt:144)
    at org.mozilla.fenix.ui.CollectionTest$deleteCollectionTest$3.invoke(CollectionTest.kt:219)
    at org.mozilla.fenix.ui.CollectionTest$deleteCollectionTest$3.invoke(CollectionTest.kt:217)
    at org.mozilla.fenix.ui.robots.BrowserRobot$Transition.openTabDrawer(BrowserRobot.kt:733)
    at org.mozilla.fenix.ui.CollectionTest.deleteCollectionTest(CollectionTest.kt:217)

Build:

https://github.com/mozilla-mobile/fenix/commit/14ee00303b495f152f43cd7d7cea5cc2f1329ee5

┆Issue is synchronized with this Jira Task

AndiAJ commented 2 years ago

Failed 1x on 7/19 Nightly Firebase link

androidx.test.uiautomator.UiObjectNotFoundException: UiSelector[SCROLLABLE=true, RESOURCE_ID=org.mozilla.fenix:id/sessionControlRecyclerView] at androidx.test.uiautomator.UiScrollable.scrollForward(UiScrollable.java:417) at androidx.test.uiautomator.UiScrollable.scrollToEnd(UiScrollable.java:595) at androidx.test.uiautomator.UiScrollable.scrollToEnd(UiScrollable.java:614) at org.mozilla.fenix.ui.robots.HomeScreenRobot$Transition.expandCollection(HomeScreenRobot.kt:396) at org.mozilla.fenix.ui.CollectionTest.deleteCollectionTest(CollectionTest.kt:223)

sv-ohorvath commented 2 years ago

Did a new trial run to see the state of the test: https://github.com/mozilla-mobile/fenix/runs/7428221077 Nothing outstanding, I think we can ignore the failure, for now, and see if it comes up again.

AndiAJ commented 2 years ago

Failed 1x on 7/22 Nightly Firebase link

androidx.test.uiautomator.UiObjectNotFoundException: UiSelector[SCROLLABLE=true, RESOURCE_ID=org.mozilla.fenix:id/sessionControlRecyclerView] at androidx.test.uiautomator.UiScrollable.scrollForward(UiScrollable.java:417) at androidx.test.uiautomator.UiScrollable.scrollToEnd(UiScrollable.java:595) at androidx.test.uiautomator.UiScrollable.scrollToEnd(UiScrollable.java:614) at org.mozilla.fenix.ui.robots.HomeScreenRobot$Transition.expandCollection(HomeScreenRobot.kt:396) at org.mozilla.fenix.ui.CollectionTest.deleteCollectionTest(CollectionTest.kt:223)

sv-ohorvath commented 2 years ago

I landed a potential fix, we'll see how it goes, this issue can be reopened if it fails again.