* add failing test * assert order of events * defer attaching of iframe till FullSnapshot is done Fixes: https://github.com/rrweb-io/rrweb/issues/567 * correct event order in iframe integration test snapshot * trigger build * trigger build * Move settimeout responsibility to snapshot https://github.com/rrweb-io/rrweb-snapshot/pull/78 * upgrade rrweb-snapshot to 1.1.4 * DRY record tests * cleanup * Upgrade puppeteer to 9.1.1 for (hopefully) more consistent behaviour between CI and development * make input bigger to prevent triggering scroll events * page.waitFor is deprecated more info: https://github.com/puppeteer/puppeteer/issues/6214 * Set os and distro for Travis ci Co-authored-by: yz-yu <yanzhen@smartx.com>
462 lines
10 KiB
Plaintext
462 lines
10 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`async-checkout 1`] = `
|
|
"[
|
|
{
|
|
\\"type\\": 4,
|
|
\\"data\\": {
|
|
\\"href\\": \\"about:blank\\",
|
|
\\"width\\": 1920,
|
|
\\"height\\": 1080
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"data\\": {
|
|
\\"node\\": {
|
|
\\"type\\": 0,
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"html\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"head\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 3
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"body\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\",
|
|
\\"id\\": 5
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"input\\",
|
|
\\"attributes\\": {
|
|
\\"type\\": \\"text\\",
|
|
\\"size\\": \\"40\\"
|
|
},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 6
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\\\n \\\\n \\",
|
|
\\"id\\": 7
|
|
}
|
|
],
|
|
\\"id\\": 4
|
|
}
|
|
],
|
|
\\"id\\": 2
|
|
}
|
|
],
|
|
\\"id\\": 1
|
|
},
|
|
\\"initialOffset\\": {
|
|
\\"left\\": 0,
|
|
\\"top\\": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 0,
|
|
\\"texts\\": [],
|
|
\\"attributes\\": [],
|
|
\\"removes\\": [
|
|
{
|
|
\\"parentId\\": 4,
|
|
\\"id\\": 6
|
|
}
|
|
],
|
|
\\"adds\\": [
|
|
{
|
|
\\"parentId\\": 4,
|
|
\\"nextId\\": null,
|
|
\\"node\\": {
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"p\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 8
|
|
}
|
|
},
|
|
{
|
|
\\"parentId\\": 8,
|
|
\\"nextId\\": null,
|
|
\\"node\\": {
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"span\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 9
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 0,
|
|
\\"texts\\": [],
|
|
\\"attributes\\": [],
|
|
\\"removes\\": [],
|
|
\\"adds\\": [
|
|
{
|
|
\\"parentId\\": 9,
|
|
\\"nextId\\": null,
|
|
\\"node\\": {
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"test\\",
|
|
\\"id\\": 10
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 4,
|
|
\\"data\\": {
|
|
\\"href\\": \\"about:blank\\",
|
|
\\"width\\": 1920,
|
|
\\"height\\": 1080
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"data\\": {
|
|
\\"node\\": {
|
|
\\"type\\": 0,
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"html\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"head\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 3
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"body\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\",
|
|
\\"id\\": 5
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\\\n \\\\n \\",
|
|
\\"id\\": 7
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"p\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"span\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"test\\",
|
|
\\"id\\": 10
|
|
}
|
|
],
|
|
\\"id\\": 9
|
|
}
|
|
],
|
|
\\"id\\": 8
|
|
}
|
|
],
|
|
\\"id\\": 4
|
|
}
|
|
],
|
|
\\"id\\": 2
|
|
}
|
|
],
|
|
\\"id\\": 1
|
|
},
|
|
\\"initialOffset\\": {
|
|
\\"left\\": 0,
|
|
\\"top\\": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 0,
|
|
\\"texts\\": [],
|
|
\\"attributes\\": [],
|
|
\\"removes\\": [
|
|
{
|
|
\\"parentId\\": 8,
|
|
\\"id\\": 9
|
|
}
|
|
],
|
|
\\"adds\\": [
|
|
{
|
|
\\"parentId\\": 4,
|
|
\\"nextId\\": null,
|
|
\\"node\\": {
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"span\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 9
|
|
}
|
|
},
|
|
{
|
|
\\"parentId\\": 9,
|
|
\\"nextId\\": null,
|
|
\\"node\\": {
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"test\\",
|
|
\\"id\\": 10
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]"
|
|
`;
|
|
|
|
exports[`custom-event 1`] = `
|
|
"[
|
|
{
|
|
\\"type\\": 4,
|
|
\\"data\\": {
|
|
\\"href\\": \\"about:blank\\",
|
|
\\"width\\": 1920,
|
|
\\"height\\": 1080
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"data\\": {
|
|
\\"node\\": {
|
|
\\"type\\": 0,
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"html\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"head\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 3
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"body\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\",
|
|
\\"id\\": 5
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"input\\",
|
|
\\"attributes\\": {
|
|
\\"type\\": \\"text\\",
|
|
\\"size\\": \\"40\\"
|
|
},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 6
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\\\n \\\\n \\",
|
|
\\"id\\": 7
|
|
}
|
|
],
|
|
\\"id\\": 4
|
|
}
|
|
],
|
|
\\"id\\": 2
|
|
}
|
|
],
|
|
\\"id\\": 1
|
|
},
|
|
\\"initialOffset\\": {
|
|
\\"left\\": 0,
|
|
\\"top\\": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 5,
|
|
\\"data\\": {
|
|
\\"tag\\": \\"tag1\\",
|
|
\\"payload\\": 1
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 5,
|
|
\\"data\\": {
|
|
\\"tag\\": \\"tag2\\",
|
|
\\"payload\\": {
|
|
\\"a\\": \\"b\\"
|
|
}
|
|
}
|
|
}
|
|
]"
|
|
`;
|
|
|
|
exports[`stylesheet-rules 1`] = `
|
|
"[
|
|
{
|
|
\\"type\\": 4,
|
|
\\"data\\": {
|
|
\\"href\\": \\"about:blank\\",
|
|
\\"width\\": 1920,
|
|
\\"height\\": 1080
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"data\\": {
|
|
\\"node\\": {
|
|
\\"type\\": 0,
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"html\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"head\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 3
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"body\\",
|
|
\\"attributes\\": {},
|
|
\\"childNodes\\": [
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\",
|
|
\\"id\\": 5
|
|
},
|
|
{
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"input\\",
|
|
\\"attributes\\": {
|
|
\\"type\\": \\"text\\",
|
|
\\"size\\": \\"40\\"
|
|
},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 6
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"textContent\\": \\"\\\\n \\\\n \\\\n \\",
|
|
\\"id\\": 7
|
|
}
|
|
],
|
|
\\"id\\": 4
|
|
}
|
|
],
|
|
\\"id\\": 2
|
|
}
|
|
],
|
|
\\"id\\": 1
|
|
},
|
|
\\"initialOffset\\": {
|
|
\\"left\\": 0,
|
|
\\"top\\": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 0,
|
|
\\"texts\\": [],
|
|
\\"attributes\\": [],
|
|
\\"removes\\": [],
|
|
\\"adds\\": [
|
|
{
|
|
\\"parentId\\": 3,
|
|
\\"nextId\\": null,
|
|
\\"node\\": {
|
|
\\"type\\": 2,
|
|
\\"tagName\\": \\"style\\",
|
|
\\"attributes\\": {
|
|
\\"_cssText\\": \\"body { background: rgb(0, 0, 0); }\\"
|
|
},
|
|
\\"childNodes\\": [],
|
|
\\"id\\": 8
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 8,
|
|
\\"id\\": 8,
|
|
\\"adds\\": [
|
|
{
|
|
\\"rule\\": \\"body { color: #fff; }\\"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 8,
|
|
\\"id\\": 8,
|
|
\\"removes\\": [
|
|
{
|
|
\\"index\\": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
\\"type\\": 3,
|
|
\\"data\\": {
|
|
\\"source\\": 8,
|
|
\\"id\\": 8,
|
|
\\"adds\\": [
|
|
{
|
|
\\"rule\\": \\"body { color: #ccc; }\\"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]"
|
|
`;
|