-
Notifications
You must be signed in to change notification settings - Fork 140
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
[REPLAY] Fix serialization for checkbox & radio #2021
[REPLAY] Fix serialization for checkbox & radio #2021
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2021 +/- ##
==========================================
- Coverage 93.59% 93.48% -0.11%
==========================================
Files 145 145
Lines 5512 5512
Branches 1250 1250
==========================================
- Hits 5159 5153 -6
- Misses 353 359 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
e01a66b
to
21a9ba1
Compare
21a9ba1
to
157f74f
Compare
) | ||
}) | ||
|
||
it('serializes <input type="radio"> elements checked state with mask serialization', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion:
- this test title is a bit misleading as it actually does not serialize the checked state.
- Maybe move it in the
describe('input privacy mode mask-user-input'
to colocate with similar tests
@@ -107,22 +107,29 @@ describe('serializeNodeWithId', () => { | |||
isolatedDom.clear() | |||
}) | |||
|
|||
function serializeElement( | |||
node: Node, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥜 nitpick: the node
argument could have the type Element
, since we are specifically serializing elements.
Motivation
When serialise checkbox & radio with mask-input-privacy. It would record the input with
checked: '***'
on all the input regardless or if it was set.It would be re-created like this in the player
Meaning all the radio & checkbox would be checked.
Let's uncheck all of them when that's the privacy setting
Changes
Delete the checked attribute instead of the overding it with
***
Testing
I have gone over the contributing documentation.