Skip to content

fix tests with maskAllText, add textarea to mask-text.html #97

Closed
billyvg wants to merge 3 commits intomd-mask-enhancements-1096from
md-mask-enhancements-1096-additional-tests
Closed

fix tests with maskAllText, add textarea to mask-text.html #97
billyvg wants to merge 3 commits intomd-mask-enhancements-1096from
md-mask-enhancements-1096-additional-tests

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Jul 13, 2023

since <textarea> has a textContent field, it can be source of bugs when used with maskAllText.

maskAllInputs?: boolean | MaskInputOptions;
maskTextFn?: MaskTextFn;
maskInputFn?: MaskTextFn;
maskInputFn?: MaskInputFn;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is desired type.

Comment on lines +366 to +371
exports[`integration tests [html file]: picture-with-inline-onload.html 1`] = `
"<html xmlns=\\"http://www.w3.org/1999/xhtml\\"><head></head><body>
<img src=\\"http://localhost:3030/images/robot.png\\" alt=\\"This is a robot\\" style=\\"opacity: 1;\\" _onload=\\"this.style.opacity=1\\" />
</body></html>"
`;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shrug

{
\\"type\\": 3,
\\"textContent\\": \\"SCRIPT_PLACEHOLDER\\",
\\"textContent\\": \\"****** **** ***********\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct, just a div with text content

Comment on lines -6375 to -6389
{
\\"type\\": 6,
\\"data\\": {
\\"plugin\\": \\"rrweb/console@1\\",
\\"payload\\": {
\\"level\\": \\"warn\\",
\\"trace\\": [
\\"Object.get (__puppeteer_evaluation_script__:13:33)\\",
\\"isObjTooDeep (:8503:25)\\",
\\"isObjTooDeep (:8503:35)\\",
\\"shouldIgnore (:8567:31)\\",
\\"Object.<anonymous> (:8536:13)\\",
\\"stringify (:8517:19)\\",
\\":8656:47\\"
],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console debugging that got saved to a snapshot

{
\\"type\\": 3,
\\"textContent\\": \\"SCRIPT_PLACEHOLDER\\",
\\"textContent\\": \\"mask4\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this should be masked....

\\"childNodes\\": [
{
\\"type\\": 3,
\\"textContent\\": \\"mask5\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be masked?

\\"childNodes\\": [
{
\\"type\\": 3,
\\"textContent\\": \\"****2\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh what is this 2?, oh is it only masking mask?

\\"childNodes\\": [
{
\\"type\\": 3,
\\"textContent\\": \\"****3\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing with 3

\\"attributes\\": {
\\"type\\": \\"radio\\",
\\"name\\": \\"toggle\\",
\\"value\\": \\"on\\"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks right, should be unmasked

@billyvg billyvg force-pushed the md-mask-enhancements-1096-additional-tests branch from 016ce19 to 02ab226 Compare July 13, 2023 14:54
@billyvg billyvg force-pushed the md-mask-enhancements-1096 branch from ab517c5 to 0bccb5b Compare July 13, 2023 20:58
@billyvg billyvg closed this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant