Bug 1887594 - Fix saveTabToExistingCollectionFromMainMenuTest UI test r=aaronmt
commit98a54cbdc5964e778af0e6b325f9e7831f00c05b
authorAndiAJ <andiaj@users.noreply.github.com>
Thu, 11 Apr 2024 06:33:47 +0000 (11 06:33 +0000)
committerAndiAJ <andiaj@users.noreply.github.com>
Thu, 11 Apr 2024 06:33:47 +0000 (11 06:33 +0000)
tree51a55b98d4b6dd28f62e85d773d035ce7055cab3
parentac32d77102fd48c1312fba42d481be6404b43c66
Bug 1887594 - Fix saveTabToExistingCollectionFromMainMenuTest UI test r=aaronmt

- The inconsistencies were caused by the fact that the tabs weren't properly selected when trying to create a collection.
- To overcome this problem, I've added a retry loop to the the tab selection function and also added an extra assertion (**verifyTabsMultiSelectionCounter**()) inside the **selectTab** function which will help us identify more easily if there is a tab selection problem

- This patch should fix the following intermittent UI tests affected by the above mentioned problem:
  -  saveTabToExistingCollectionFromMainMenuTest
  -  renameCollectionTest
  -  verifyExpandedCollectionItemsTest
  -  removeTabFromCollectionUsingSwipeRightActionTest
  -  removeTabFromCollectionUsingSwipeLeftActionTest
  -  saveTabToExistingCollectionUsingTheAddTabButtonTest

✅ saveTabToExistingCollectionFromMainMenuTest - successfully passed 150x on Firebase
✅ renameCollectionTest - successfully passed 150x on Firebase
✅ verifyExpandedCollectionItemsTest - successfully passed 150x on Firebase

Differential Revision: https://phabricator.services.mozilla.com/D207146
mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/ComposeCollectionTest.kt
mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ComposeTabDrawerRobot.kt