Add QA test tags to the shared Open URL confirmation dialog - #2178
Merged
Conversation
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
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 everyurlOpenconfirmation in the app is covered rather than just the Pro refund ones:open-url-dialog— the dialog rootopen-url-description— the body text, which carries the interpolated urlopen-url-confirm-button— the Open button (the same id session-desktop already uses, so the harness needs one locator rather than one per platform)AlertDialogContenthardcodedAccessibilityId_modalMessageon its body, so a caller could not tag it. Rather than restructure the component it gains an optionaltextQaTagthat falls back to the shared modal id — matching the existing convention inComponents.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