-
-
Notifications
You must be signed in to change notification settings - Fork 2
fix: resolve the defects pinned during the UI-test pass #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8b6a6da
fix(app): replay boolean attributes by presence, not by value
vishnuv688 ed23bc3
fix(app): make show-command the logs panel's only input, and tear it …
vishnuv688 1dc84aa
fix(app): time a console entry captured at zero like any other
vishnuv688 c718b52
fix(app): judge a run-all against canRunAll, and say why it is refused
vishnuv688 7db1e59
fix(app): keep a multi-line failure inside its own bullet
vishnuv688 41f5a8e
fix(core): keep a test's step titles in its own trace slice
vishnuv688 437f6b4
fix(app): colour a trace's resource dots by sniffing its response type
vishnuv688 daa54c3
fix(app): read a failed request's status as ERR in the list and the card
vishnuv688 0f43317
fix(app): keep the compare toolbar on one line
vishnuv688 eb54e1d
fix(script): put an attribute removal on the wire as a removal
vishnuv688 3d45ec9
refactor: give RUN_ALL_UID and the transcript builder one home each
vishnuv688 5034767
fix(app): replay a non-boolean attribute removal as a removal
vishnuv688 33efd44
fix(app): keep a boolean attribute the page set to false
vishnuv688 d56ce57
fix(app): empty a replayed field whose value attribute the page removed
vishnuv688 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| /** HTML boolean content attributes: presence alone is the state, so a captured | ||
| * "false" has to REMOVE one — written verbatim, `checked="false"` reads as | ||
| * checked. Curated rather than probed off the element, because a probe both | ||
| * misses and misfires: `readonly` has no same-named property (it is `readOnly`), | ||
| * while `draggable`, `spellcheck` and `translate` do carry boolean properties | ||
| * yet their attributes are enumerated, where "false" is a meaningful value. */ | ||
| const BOOLEAN_ATTRIBUTES = new Set([ | ||
| 'allowfullscreen', | ||
| 'autofocus', | ||
| 'autoplay', | ||
| 'checked', | ||
| 'controls', | ||
| 'default', | ||
| 'disabled', | ||
| 'formnovalidate', | ||
| 'inert', | ||
| 'ismap', | ||
| 'itemscope', | ||
| 'loop', | ||
| 'multiple', | ||
| 'muted', | ||
| 'novalidate', | ||
| 'open', | ||
| 'playsinline', | ||
| 'readonly', | ||
| 'required', | ||
| 'reversed', | ||
| 'selected' | ||
| ]) | ||
|
|
||
| /** Whether a captured attribute is one whose presence IS its state. `hidden` and | ||
| * every `aria-*` are absent for the same reason `draggable` is: their "false" | ||
| * is a real value to write, not an absence to replay. */ | ||
| export const isBooleanAttribute = (name: string) => | ||
| BOOLEAN_ATTRIBUTES.has(name.toLowerCase()) | ||
|
|
||
| /** The only boolean attribute the collector reports as a PROPERTY state rather | ||
| * than as the attribute's own value: `packages/script` emits `String(el.checked)` | ||
| * on every input and change, so a cleared checkbox arrives as "false". Every | ||
| * other boolean attribute reaches the wire only through a real mutation record, | ||
| * which carries whatever the page set. */ | ||
| const PROPERTY_STATE_ATTRIBUTES = new Set(['checked']) | ||
|
|
||
| /** State a captured boolean attribute carries. A record with no value is off — | ||
| * there is no attribute state to set. Otherwise presence IS the state, so any | ||
| * value means on, including `''` (`<input disabled>` reaches the wire empty). | ||
| * | ||
| * A literal "false" is the one value that depends on which attribute it is: | ||
| * `checked="false"` is the collector reporting an unchecked box, but | ||
| * `disabled="false"` can only be the page having SET that attribute, and a | ||
| * boolean attribute is active whenever present — so it replays as disabled. | ||
| * The residual ambiguity is a page literally writing `checked="false"`; the | ||
| * collector's own signal wins there, since it fires on every field edit. */ | ||
| export const booleanAttributeOn = (name: string, value?: string) => { | ||
| if (value === undefined) { | ||
| return false | ||
| } | ||
| if (!PROPERTY_STATE_ATTRIBUTES.has(name.toLowerCase())) { | ||
| return true | ||
| } | ||
| return value.toLowerCase() !== 'false' | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.