Skip to content

Commit 53fb112

Browse files
committed
Bug 1924094 - Wait for add-on list to be loaded and download to be finalised in UI tests r=aaronmt,ohorvath
While trying to address the issues encountered lately on all branches in some add-ons related UI tests, I've added: - A wait for the download list to be properly being displayed (this should also improve syncing and not falsely swipe on the list while the featured add-ons aren't yet loaded) - A wait for the add-ons download overlay to be gone, to be able to properly verify the add-on permission prompt. The following UI tests successfully passed 200x on both API 30 and 34: verifyUBlockWorksInNormalModeTest verifyAddonsCanBeUninstalledTest verifyUBlockWorksInPrivateModeTest Differential Revision: https://phabricator.services.mozilla.com/D225350 UltraBlame original commit: d0f8243c3b3c8f6ab5d52d6e4f791b9652af49e6
1 parent d665106 commit 53fb112

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAddonsTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,9 @@ add_ons_list
440440
)
441441
)
442442
{
443+
waitForAddonsListProgressBarToBeGone
444+
(
445+
)
443446
clickInstallAddon
444447
(
445448
addonName

mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAddonsManagerRobot.kt

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,30 @@ helpers
405405
.
406406
MatcherHelper
407407
.
408+
assertUIObjectIsGone
409+
import
410+
org
411+
.
412+
mozilla
413+
.
414+
fenix
415+
.
416+
helpers
417+
.
418+
MatcherHelper
419+
.
420+
itemWithResId
421+
import
422+
org
423+
.
424+
mozilla
425+
.
426+
fenix
427+
.
428+
helpers
429+
.
430+
MatcherHelper
431+
.
408432
itemWithResIdContainingText
409433
import
410434
org
@@ -549,6 +573,48 @@ exists
549573
shouldBeDisplayed
550574
)
551575
fun
576+
waitForAddonsListProgressBarToBeGone
577+
(
578+
)
579+
=
580+
assertUIObjectIsGone
581+
(
582+
itemWithResId
583+
(
584+
"
585+
packageName
586+
:
587+
id
588+
/
589+
add_ons_progress_bar
590+
"
591+
)
592+
waitingTime
593+
=
594+
waitingTimeLong
595+
)
596+
fun
597+
waitForAddonsDownloadOverlayToBeGone
598+
(
599+
)
600+
=
601+
assertUIObjectIsGone
602+
(
603+
itemWithResId
604+
(
605+
"
606+
packageName
607+
:
608+
id
609+
/
610+
addonProgressOverlay
611+
"
612+
)
613+
waitingTime
614+
=
615+
waitingTimeLong
616+
)
617+
fun
552618
verifyAddonDownloadOverlay
553619
(
554620
)
@@ -633,6 +699,9 @@ addonName
633699
String
634700
)
635701
{
702+
waitForAddonsDownloadOverlayToBeGone
703+
(
704+
)
636705
mDevice
637706
.
638707
waitNotNull
@@ -1105,6 +1174,9 @@ openThreeDotMenu
11051174
.
11061175
openAddonsManagerMenu
11071176
{
1177+
waitForAddonsListProgressBarToBeGone
1178+
(
1179+
)
11081180
scrollToAddon
11091181
(
11101182
addonName
@@ -1975,6 +2047,9 @@ openThreeDotMenu
19752047
.
19762048
openAddonsManagerMenu
19772049
{
2050+
waitForAddonsListProgressBarToBeGone
2051+
(
2052+
)
19782053
clickInstallAddon
19792054
(
19802055
addonName
@@ -2014,6 +2089,9 @@ openThreeDotMenu
20142089
.
20152090
openAddonsManagerMenu
20162091
{
2092+
waitForAddonsListProgressBarToBeGone
2093+
(
2094+
)
20172095
clickInstallAddon
20182096
(
20192097
addonName

0 commit comments

Comments
 (0)