Repository navigation
test: leave hidden presses out of the spent-control face comparison - #6841
Merged
Merged
Conversation
Since #6801 the floating panel's composer hides its resting Dictate with the `hidden` attribute rather than panel CSS. Dictate's command is available only while `!mic.hidden`, so the keyboard scope marks the hidden button `aria-disabled="true"`, and the spent-control test started comparing its face. A disabled disc keeps the quiet ink at full opacity (controls.css), so the hidden Dictate read the same with its disabled state lifted. A press its owner hid draws nothing, so the test now compares only presses that aren't hidden. The behavior it protects, that every drawn spent control looks different from its live face, is unchanged. Closes #6837
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.
test_a_control_a_widget_built_is_told_from_a_label_it_wrotefailed onmainbecause of #6801 (10ac9da49). Bisecting over017ddeccf..10ac9da49gives52258cd8bpassing and10ac9da49failing. With this change the test passes on currentmain(49007d755) and still passes at52258cd8b.Cause. #6801 made the composer own which press stands in the field's corner. The panel field's resting Dictate is now hidden with the
hiddenattribute, where the panel used to hide it withdisplay: none. Dictate's keyboard command is available only while!mic.hidden(browser/runtime/composing/input.js,text.dictate), so the scope marks the hidden buttonaria-disabled="true"(keyboard/scopes.js,reflectButton). The test gathers every spent[data-lf-offer]press and requires its face to change when the disabled state is lifted. A disabled disc keeps the quiet ink at full opacity (controls.css, "A press disabled keeps the quiet ink"), so the hidden Dictate looked the same either way. That is the one entry in the failure whosefaceandarmedmatched.Repair. The test now leaves out presses whose own
hiddenis set. They draw nothing, so their face has nothing to tell apart. #6801's intent and the interface are unchanged. The behavior the test protects, that every spent control on screen looks different from its live face, is still asserted on the composer's Send and the media viewer's controls.One observation for a later look, not changed here: a visible Dictate marked disabled, as while a send or upload is in flight, also keeps its resting face, since
controls.cssgives a disabled disc the quiet ink Dictate already wears. Only the cursor and the missing hover tint show it is spent. That is the stated design, and this page never draws that state.Closes #6837 — automated triage