Closed Bug 2099309 Opened 16 hours ago Closed 10 hours ago

ui/efficiency SettingsSearchTest and SettingsCustomizeSimpleToolbarTest fail on the Nightly build

Categories

(Firefox for Android :: UI Tests, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: aaronmt, Assigned: aaronmt)

References

Details

Attachments

(1 external file)

Two ui/efficiency tests fail consistently (on both attempts) when run against the R8-optimized Nightly build in fenix-nightly(ui-test-arm-nightly), while they pass on the debug build in fenix-tae-arm-debug. Neither failure is caused by R8; both tests rely on assumptions that only hold for debug builds.

  1. SettingsSearchTest#verifySearchShortcutChangesAreReflectedInSearchSelectorMenuTest

    java.lang.AssertionError: 'Search selector menu engine: YouTube' not found (COMPOSE_BY_CONTENT_DESCRIPTION -> YouTube)

SettingsSearchManageShortcutsPage.selectSearchShortcut clicks findObject(text(engineName)).getFromParent(index(checkboxIndex)). The rows in SearchEngineShortcuts carry no semantics, so every checkbox and label in the list are siblings and the index is a position in the whole list, not within the engine row. Debug and Nightly request the search configuration with different channels (SearchUpdateChannel.DEFAULT vs SearchUpdateChannel.NIGHTLY in Core), so the engine list differs (Nightly also lists Perplexity). On Nightly the click at index 13 toggles Wikipedia instead of YouTube, which the test video confirms.

Proposed fix: locate the checkbox with SearchEngineShortcutsTestTag.checkbox(engineName) (as the legacy robot does), click it only if it is unchecked, assert that it ends up checked, and drop the checkboxIndex parameter.

  1. SettingsCustomizeSimpleToolbarTest#verifyTheSimpleToolbarLayoutHomepageShortcutOptionTest

    java.lang.AssertionError: Failed to verify NAVIGATION_READY readiness for SearchBarComponent

After mozEnterText and mozPressEnter in the search bar, the final on.browserPage.navigateToPage() checks for the engineView resource id about 50 ms after Enter, does not find it, assumes the app is still on SearchBarComponent, and fails that page's readiness check. The failure screen dump shows the page did load (the address bar shows the second test page and two tabs are open), so this is a timing race. A possible Nightly-specific contributor is the tab-management-enhancements Nimbus default opening_animation_enabled: true, which only applies to the nightly channel (unverified).

Proposed fix: after mozPressEnter, wait for the browser page explicitly with a timed mozVerify(BrowserPageSelectors.ENGINE_VIEW) instead of calling navigateToPage().

Pushed by atrain@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f253d39f2ef3 https://hg.mozilla.org/integration/autoland/rev/7f4df1f77a62 ui/efficiency SettingsSearchTest and SettingsCustomizeSimpleToolbarTest fail on the Nightly build r=mobiletest-reviewers,jajohnson
Status: NEW → RESOLVED
Closed: 10 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: