Skip to content

Commit

Permalink
use standard rrweb
Browse files Browse the repository at this point in the history
  • Loading branch information
tevanoff committed Nov 9, 2023
1 parent f9c5b5b commit 2c9503f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
"access": "public"
},
"dependencies": {
"@chromaui/rrweb-snapshot": "2.0.0-alpha.7-noAbsolute.2",
"@segment/analytics-node": "^1.1.0",
"fs-extra": "^11.1.1",
"mime": "^3.0.0",
"rrweb-snapshot": "^2.0.0-alpha.4",
"ts-dedent": "^2.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/playwright-api/takeArchive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function takeArchive(
// Serialize and capture the DOM
const domSnapshot: elementNode = await page.evaluate(dedent`
${rrweb};
rrwebSnapshot.snapshot(document, { noAbsolute: true });
rrwebSnapshot.snapshot(document);
`);

testInfo.attach(name, { contentType, body: JSON.stringify(domSnapshot) });
Expand Down
3 changes: 1 addition & 2 deletions src/write-archive/archive-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export class ArchiveFile {
}

originalSrc() {
// Assets that we capture will be stripped of the domain in the source
return `${this.url.pathname}${this.url.search}`;
return this.url.toString();
}

toFileSystemPath() {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11571,6 +11571,11 @@ rollup@^3.2.5:
optionalDependencies:
fsevents "~2.3.2"

rrweb-snapshot@^2.0.0-alpha.4:
version "2.0.0-alpha.4"
resolved "https://registry.yarnpkg.com/rrweb-snapshot/-/rrweb-snapshot-2.0.0-alpha.4.tgz#2801bf5946177b9d685a01661a62d9d2e958f174"
integrity sha512-KQ2OtPpXO5jLYqg1OnXS/Hf+EzqnZyP5A+XPqBCjYpj3XIje/Od4gdUwjbFo3cVuWq5Cw5Y1d3/xwgIS7/XpQQ==

run-parallel@^1.1.9:
version "1.2.0"
resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz"
Expand Down

0 comments on commit 2c9503f

Please sign in to comment.