make the unit tests more stable

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent ca2b074743
commit e194e08b17
3 changed files with 44 additions and 3 deletions

View File

@@ -285,8 +285,9 @@ exports[`block 1`] = `
\\"tagName\\": \\"div\\",
\\"attributes\\": {
\\"class\\": \\"rr-block\\",
\\"rr_width\\": \\"1904px\\",
\\"rr_height\\": \\"19px\\"
\\"style\\": \\"width: 50px; height: 50px;\\",
\\"rr_width\\": \\"50px\\",
\\"rr_height\\": \\"50px\\"
},
\\"childNodes\\": [],
\\"id\\": 18

View File

@@ -204,6 +204,44 @@ exports[`async-checkout 1`] = `
\\"top\\": 0
}
}
},
{
\\"type\\": 3,
\\"data\\": {
\\"source\\": 0,
\\"texts\\": [],
\\"attributes\\": [],
\\"removes\\": [
{
\\"parentId\\": 8,
\\"id\\": 9
}
],
\\"adds\\": [
{
\\"parentId\\": 4,
\\"previousId\\": 8,
\\"nextId\\": null,
\\"node\\": {
\\"type\\": 2,
\\"tagName\\": \\"span\\",
\\"attributes\\": {},
\\"childNodes\\": [],
\\"id\\": 9
}
},
{
\\"parentId\\": 9,
\\"previousId\\": null,
\\"nextId\\": null,
\\"node\\": {
\\"type\\": 3,
\\"textContent\\": \\"test\\",
\\"id\\": 10
}
}
]
}
}
]"
`;

View File

@@ -7,6 +7,8 @@
<title>Block record</title>
</head>
<body>
<div class="rr-block"><input type="text" /> <span id="text"></span></div>
<div class="rr-block" style="width: 50px; height: 50px;">
<input type="text" /> <span id="text"></span>
</div>
</body>
</html>