Closed Bug 2063074 Opened 1 month ago Closed 24 days ago

Bug 2063074 - [efficiency] Convert SearchTest.searchGroupIsNotGeneratedForLinksOpenedInPrivateTabsTest to ui/efficiency

Categories

(Firefox for Android :: UI Tests, task)

task

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox156 --- fixed

People

(Reporter: jajohnson, Assigned: jajohnson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Context: part of the ui/efficiency UI-test modernization. This is a faithful port of an existing legacy ui/ smoke test onto the ui/efficiency framework — same coverage and assertions, but far less per-test code via a shared page-object / selector / navigation layer, which bends the UI-test maintenance cost curve. Smoke-conversion campaign.

TestRail: 1591781

Summary: [efficiency] Convert SearchTest.searchGroupIsNotGeneratedForLinksOpenedInPrivateTabsTest to ui/efficiency → Bug 2063074 - [efficiency] Convert SearchTest.searchGroupIsNotGeneratedForLinksOpenedInPrivateTabsTest to ui/efficiency

Ports the legacy smoke test onto ui/efficiency and annotates the legacy method with
@Converted. Reuses the search-group capability added in bug 2063072; the only new
pieces are two small ones:

  • TabDrawerPage.openPrivateTab(position) - positional, like verifyOpenTabsOrder, and
    for the same reason: the mozClick family can say "click something matching" but not
    "click the nth child". Each private tab has to actually be opened, not merely
    created: the pages are lazily loaded until selected, and loading them is what would
    leak into history if private browsing did not isolate it.
  • HistorySelectors.HISTORY_ITEM_WITH_TEXT(text) - any History row containing text,
    mirroring the legacy generic verifyHistoryItemExists.

Every return to the tab manager is re-anchored through BrowserPage, because a
TabDrawerPage -> TabDrawerPage path resolves to an empty step list and would silently
do nothing (MTE-5818).

One deliberate deviation, worth a reviewer's eye. Legacy finishes with

verifyHistoryItemExists(shouldExist = false, item = "3 sites")

but the History screen renders a group's size through
history_search_group_sites_1 = "%d pages" (HistoryListItemViewHolder.kt:80-88), and
grepping the tree finds no "%d sites" string in any locale. The legacy assertion
therefore checks for the absence of text the app can never render: it passes even if
the search group is present, so it contributes no coverage. This port asserts the
absence of the caption the app actually renders ("3 pages"). It asserts the caption
rather than the group title because the title is the search term, which also appears
inside the visited search-results URL and so is present on that screen either way.

Note also that the homepage caption is "N pages" while the legacy test's wording
suggested "N sites" - there is only one string, used by both screens.

Green on the first device attempt, no retries.

Pushed by jajohnson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c48d9359e0dc https://hg.mozilla.org/integration/autoland/rev/aee54c70e732 [efficiency] Convert SearchTest.searchGroupIsNotGeneratedForLinksOpenedInPrivateTabsTest to ui/efficiency r=aaronmt
Status: NEW → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: