Repository navigation
fix(screenshots): assert the phone's refused queue instead of a control it lost - #1618
Merged
Merged
Conversation
…ol it lost `send-queue-refused-edit` still asserted a `重试` control inside the phone's queue panel. That control went away with #1485, when the queue became the session's own list rather than something this phone held and retried, so the scenario could not fail: it was guarding a state the product no longer has. Rewritten against what the phone does now. The fixture seats two waiting rows (`?queue=2`), so the panel is there as its header line — `2 条等待中` and `当前回复结束后合并成一条发送` — and draws no rows until that line is tapped. A hand-over refused by the host (`?queueFail=1` → `session_busy`) must leave the sentence in the field, add no row and stop no run. Then one tap opens the queue and the first waiting row opens into a field holding its own words, with `保存`/`取消` beside it and its bin still on the row. That refusal sentence itself goes through `Alert.alert`, which react-native-web does not draw, so the capture asserts the state the refusal leaves behind rather than its copy — said plainly in the scenario's note, so nobody reads the missing sentence as a bug. Falsified twice, both red on the harness: putting the old `重试` assertion back fails with "the panel offers no retry", and dropping the header tap fails with "one tap did not open the queue: 0". Green: `capture-mobile` captures 1/1, and the same run together with `send-queue-choice` captures 2/2.
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.
What and why
The mobile screenshot scenario
send-queue-refused-editwas still asserting the refused queue the phone no longer draws: a panel offering a retry control, with the refused row opened for editing inside it. The phone's queue surface is a header line over the conversation, and rows appear only after the reader opens it, so the scenario failed on a control the UI deliberately dropped and the capture it exists for could not be taken at all.This rewrites it against what the phone actually does: two rows already waiting behind the running turn (collapsed header, no rows drawn), a new sentence handed over with the queue action while the host refuses it, then one tap to expand the header and one to open the first waiting row into its editor.
Commits
Verification
python3 scripts/tests/test-screenshot-scenario-fragments.py->ok: scenario fragments merge, override and fail loudlycapture.load_scenarios: 22 steps, URL carriesqueueFail=1&queue=2, one shota62cad80e:capture-mobile send-queue-refused-edit-> 1/1 captured, every one of the 22 steps returned its expected value,m-send-queue-refused-edit.pngwrittenqueueFail=1dropped from the scenario URL the hand-over succeeds and the step reportsthe refused sentence was dropped: ""(0/1 captured). The URL was restored afterwards and the file hashes identical to the committed blob.Notes
scripts/screenshots/scenarios.d/merge into the sharedscenarios.jsonper platform; this fragment overrides only its own mobile entry.User-visible changes
none: a screenshot scenario only. No product code, no default value, setting, migration or wire change.