test(chat): cover the message selection bar, edit and delete end to end - #1407
Merged
Conversation
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.
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.
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.
resolveCapabilitiesreturns an empty set whileeventSequenceis0, 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.yamlretries 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.Overflownow carriesaction_message_overflow, andsubflows/assert_message_action.yaml/subflows/tap_message_action.yamlprobe 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.yamlmoves onto the extractedsubflows/open_tip_chat.yamland 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.