Skip to content

test(chat): cover the message selection bar, edit and delete end to end - #1407

Merged
bmc08gt merged 1 commit into
code/cashfrom
test/chat-message-actions
Sep 4, 2026
Merged

test(chat): cover the message selection bar, edit and delete end to end#1407
bmc08gt merged 1 commit into
code/cashfrom
test/chat-message-actions

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Three Maestro flows over the chat message actions from #1394, #1400 and #1403, run against the tip conversation and tagged smoke:

  • chat_message_selection.yaml — a long-press puts up the bar with Delete, Copy and Edit, and both the back arrow and the Back gesture drop it without touching the message.
  • chat_message_edit.yaml — an edit takes the composer over (cancel and confirm replace send) and hands the draft it displaced back, on cancel and on confirm alike.
  • chat_message_delete.yaml — the confirmation sheet, Back leaving the message alone, and Delete For Everyone taking it out of the transcript.

All three are fund-safe: they act only on a stamped message the run itself sent.

Three details the flows had to be written around

A just-sent message is not selectable. resolveCapabilities returns an empty set while eventSequence is 0, and the text is in the transcript before the server acks it. A long-press is a one-shot, so waiting has to wrap the press rather than follow it — subflows/select_own_message.yaml retries it.

The bar collapses actions into an overflow based on width, so a flow cannot know whether an action is an icon or a menu item. AppBarDefaults.Overflow now carries action_message_overflow, and subflows/assert_message_action.yaml / subflows/tap_message_action.yaml probe the icon first and fall back to the menu. That tag is the only production change in this PR.

An edited bubble is not just its body. It appends an inline placeholder to reserve room for the "Edited" marker, and the placeholder's alternate text — a figure space — lands in the accessibility text. Maestro matches the whole string, so the edit flow's post-edit assertion needs a trailing .*.

Also here

tip_chat.yaml moves onto the extracted subflows/open_tip_chat.yaml and scrolls to the tip event rather than asserting it in place. The tip chat is shared and append-only, so every run of these flows pushes the tip events further up it — that assertion had already started failing.

Three Maestro flows against the tip conversation, all tagged `smoke`:

- `chat_message_selection.yaml` — a long-press puts up the bar with Delete, Copy and Edit, and
  both the back arrow and the Back gesture drop it without touching the message.
- `chat_message_edit.yaml` — an edit takes the composer over and hands the draft it displaced
  back, on cancel and on confirm alike.
- `chat_message_delete.yaml` — the confirmation sheet, Back leaving the message alone, and
  Delete For Everyone taking it out of the transcript.

Three details the flows had to be written around:

- A just-sent message is not selectable. `resolveCapabilities` returns nothing while
  `eventSequence` is 0, and the text reaches the transcript before the ack does; the long-press
  is a one-shot, so `subflows/select_own_message.yaml` retries the press rather than waiting
  after it.
- The bar collapses actions into an overflow on width, so a flow cannot name where an action
  ended up. `AppBarDefaults.Overflow` now carries `action_message_overflow` and the two action
  subflows probe the icon before the menu. That tag is the only production change here.
- An edited bubble's accessibility text ends in the figure space that reserves room for the
  "Edited" marker, and Maestro matches the whole string.

`tip_chat.yaml` moves onto the extracted `subflows/open_tip_chat.yaml` and scrolls to the tip
event rather than asserting it in place: the transcript is shared and append-only, so every run
of these flows pushes it further up.
@bmc08gt bmc08gt self-assigned this Sep 4, 2026
@github-actions github-actions Bot added the type: test Test additions or improvements label Sep 4, 2026
@bmc08gt
bmc08gt merged commit f2a595d into code/cash Sep 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: test Test additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant