Skip to content

feat(qa): make the Pro stats counts readable to a test - #2187

Merged
mpretty-cyro merged 1 commit into
devfrom
feat/qa-tag-pro-stats-value
Aug 25, 2026
Merged

mpretty-cyro merged 1 commit into
devfrom
feat/qa-tag-pro-stats-value

Conversation

@Bilb

@Bilb Bilb commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Adds one qa tag so the "Your Pro Stats" counts can be read by the automation suite.

The problem

Each cell already has an id — pro-stats-badges-sent, -longer-messages, -pinned-conversations, -groups-upgraded — but they sit on ProStatItem's root Row. qaTag is semantics { testTagsAsResourceId = true }.testTag(…), which sets a resource-id and no description, and a Row is a layout container with no text of its own.

So the number is visible on screen and unreadable to a test. A spec could only assert "four cells exist" — coverage that cannot fail.

The change

One string (qa_pro_stats_value → pro-stats-value) and one qaTag on the Text that holds the value.

Generic on purpose. The cell's identity is already the row's id; a reader scopes this child by that parent. Same shape as the existing action-item-title and pro-screen-action-label.

pro-stats-badges-sent          (row — identity)
  └── pro-stats-value          (text — "12 badges sent")

One thing worth knowing

pro-stats-groups-upgraded is readable today, but only by accident: its tooltip makes the row clickable, and clickable merges descendants into the parent's semantics. The other three have no tooltip and are not readable. That is not a property to depend on — it vanishes with the tooltip.

Why now

It unblocks a Pro-stats spec on Android. That spec currently has to be iosIt, because iOS puts the id on the cell title where the text already is. With this, it becomes bothPlatformsIt with no other change.

Also relevant: groups-upgraded currently has no data source on any client — Android hard-codes 0, iOS's counter has no write site, Desktop assigns 0. Tagged here for symmetry; not something a test should assert yet.

Verification

./gradlew :app:compilePlayAutomaticQaKotlin — BUILD SUCCESSFUL. Not exercised on a device; it is a semantics-only change with no runtime behaviour.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Each stats cell already carries its own qa tag, but on the Row -- a layout
container. Compose's testTag sets a resource-id and no description, and the Row
has no text of its own, so the count ("12 badges sent") was present on screen and
absent from every node a test could address. A spec could assert that four cells
exist, which is coverage that cannot fail.

Tags the Text that actually holds the value. Generic on purpose: the cell's
identity is the row's id, and a reader scopes this child by it -- the same shape
as action-item-title and pro-screen-action-label.

Worth noting pro-stats-groups-upgraded reads today only by accident: its tooltip
makes the row clickable, and clickable merges descendants. That is not a property
to depend on, and it disappears if the tooltip does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mpretty-cyro
mpretty-cyro merged commit f9b0db1 into dev Aug 25, 2026
5 checks passed
@mpretty-cyro
mpretty-cyro deleted the feat/qa-tag-pro-stats-value branch August 25, 2026 20:55
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