-
Notifications
You must be signed in to change notification settings - Fork 1.3k
For #15624 & #17484: improves tab drawer locator & avoids homescreen refreshing #22133
Conversation
dff0329
to
f6b9a98
Compare
// saving default values of feature flags | ||
private var jumpBackInCFRDefault: Boolean = settings.shouldShowJumpBackInCFR | ||
private var recentTabsFeatureDefault: Boolean = settings.showRecentTabsFeature | ||
private var showPocketDefault: Boolean = settings.showPocketRecommendationsFeature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is the first time I think we've interacted with feature flags, I think we move this logic out of the test and create a new basic test helper class file FeatureFlagHelper
and use that for basic setting of the flags. We should append the helper with some of the active features https://github.com/mozilla-mobile/fenix/blob/main/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt and then in the teardown we can have a resetAllFeatureFlagDefaults()
call or something
@sv-ohorvath what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me. I'll see what I can do
f6b9a98
to
a0be15a
Compare
@AaronMT After making the requested changes, I re-ran the tests just in case and saw the snackbar button issue is not fixed actually, it appeared again: Firebase log of failure. |
d22d0ef
to
78b927d
Compare
After running the tests hundreds of times, the snackbar button visibility might still be an issue that is not clear to me how to fix. Also, there might be a bug where you click the undo button and the tab is not restored, which is not reproducible manually. |
@@ -546,7 +550,10 @@ class BrowserRobot { | |||
} | |||
|
|||
fun openTabDrawer(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition { | |||
mDevice.waitNotNull(Until.findObject(By.desc("Tabs"))) | |||
mDevice.findObject( | |||
UiSelector().descriptionContains("open tab. Tap to switch tabs.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no id for this one? (Just want to try and limit our hard coded English strings), otherwise look's good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did use an ID before, but it was flaky. Not sure why, but text worked better.
f7ac36f
to
ea3f1db
Compare
ea3f1db
to
1af80cf
Compare
For #15624 & #17484 UI tests.
I disabled the recent tabs and Pocket sections in these tests because they were refreshing in the background, and I think it interfered with the test's ability to locate the Undo snackbar.
Tested on Firebase 300 times and all passed.
Pull Request checklist
To download an APK when reviewing a PR: