Skip to content

Add QA test tags to the shared Open URL confirmation dialog - #2178

Merged
mpretty-cyro merged 2 commits into
devfrom
qa/open-url-dialog-tags
Aug 24, 2026
Merged

Add QA test tags to the shared Open URL confirmation dialog#2178
mpretty-cyro merged 2 commits into
devfrom
qa/open-url-dialog-tags

Conversation

@Bilb

@Bilb Bilb commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

The e2e suite (session-appium) cannot assert anything about the Open URL confirmation dialog. Its body carried only the generic modal-message id, and the dialog root and Open button had none — so a spec cannot check that the dialog appeared, read which url it offers, or confirm it by anything more stable than a localized button title.

Adds three tags, applied in the shared OpenURLAlertDialog, so every urlOpen confirmation in the app is covered rather than just the Pro refund ones:

  • open-url-dialog — the dialog root
  • open-url-description — the body text, which carries the interpolated url
  • open-url-confirm-button — the Open button (the same id session-desktop already uses, so the harness needs one locator rather than one per platform)

AlertDialogContent hardcoded AccessibilityId_modalMessage on its body, so a caller could not tag it. Rather than restructure the component it gains an optional textQaTag that falls back to the shared modal id — matching the existing convention in Components.kt. Every other dialog is unaffected.

"Copy URL" is deliberately left untagged: an existing harness locator finds it by its display string, and a testTag there would change its resource-id and break that spec.

Verified with ./gradlew :app:compilePlayAutomaticQaKotlin — BUILD SUCCESSFUL.

🤖 Generated with Claude Code

Bilb and others added 2 commits August 24, 2026 09:47
The e2e suite (session-appium) could not assert anything about the Open
URL confirmation dialog, because it carried no ids of its own: its body
only had the generic AccessibilityId_modalMessage that every modal
shares, and neither the dialog root nor the "Open" button had anything at
all. A spec could not tell this dialog apart from any other modal, let
alone assert WHICH url was about to be opened.

Tagging it here rather than at a call site covers every urlOpen
confirmation in the app at once - OpenURLAlertDialog is shared by
settings, the token page, the Pro settings dialogs, in-app review, the
start-conversation sheet and the invite screen.

The strings match the ones the Desktop client uses, so the harness needs
one locator rather than one per platform (open-url-confirm-button already
exists in session-desktop's OpenUrlModal).

AlertDialogContent hardcoded the modal-message id, so the body could not
be tagged by a caller. Rather than restructure the component, this adds
an optional, defaulted textQaTag parameter threaded through both
AlertDialog overloads, falling back to AccessibilityId_modalMessage when
absent - so every other dialog is unchanged. This matches the existing
convention in Components.kt (@stringres textQaTag with a `?:` fallback).

The "Copy URL" button is deliberately left untagged: the harness's
CopyURLButton locator finds it by its "Copy URL" label, which is the
fallback DialogButtonData uses when no qaTag is given. Adding a testTag
would change its resource-id and break review_triggers.spec.ts.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A `qaTag` on the primary action covers a node whose own `text` is empty: Compose puts the copy on an
untagged child TextView, so a UI test filtering that button by its text matches nothing. Confirmed
from a device page-source dump - the `pro-screen-action` node reports `text=""` with a
`android.widget.TextView text="Request Refund"` child.

That matters because the label is what distinguishes the refund states from each other: the store's
window being open or closed changes the CTA from "Open {platform} Website" to "Request Refund", and
that is the difference a user can act on. iOS already exposes its label, so the e2e suite could
assert this on one platform and not the other.

Threads an optional `textQaTag` down to the label, defaulted to null so every existing caller is
unchanged, and applies it on the Pro screens' primary action. Same shape as the `textQaTag` this
branch already added to `AlertDialogContent`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mpretty-cyro
mpretty-cyro merged commit 77dd631 into dev Aug 24, 2026
5 checks passed
@mpretty-cyro
mpretty-cyro deleted the qa/open-url-dialog-tags branch August 24, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants