Skip to content

Commit

Permalink
Tests: Iframe event order (rrweb-io#568)
Browse files Browse the repository at this point in the history
* add failing test

* assert order of events

* defer attaching of iframe till FullSnapshot is done
Fixes: rrweb-io#567

* correct event order in iframe integration test snapshot

* trigger build

* trigger build

* Move settimeout responsibility to snapshot
rrweb-io/rrweb-snapshot#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: puppeteer/puppeteer#6214

* Set os and distro for Travis ci

Co-authored-by: yz-yu <[email protected]>
  • Loading branch information
Juice10 and Yuyz0112 authored Jun 17, 2021
1 parent 069397c commit 8a9212f
Show file tree
Hide file tree
Showing 8 changed files with 524 additions and 382 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: node_js

os: linux

dist: focal

node_js:
- 12

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
"@types/inquirer": "0.0.43",
"@types/mocha": "^5.2.5",
"@types/node": "^10.11.7",
"@types/puppeteer": "^1.11.1",
"@types/puppeteer": "^5.4.3",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
"inquirer": "^6.2.1",
"jest-snapshot": "^23.6.0",
"mocha": "^5.2.0",
"prettier": "2.2.1",
"puppeteer": "^1.11.0",
"puppeteer": "^9.1.1",
"rollup": "^2.3.3",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function record<T = eventWithTime>(
lastFullSnapshotEvent = e;
incrementalSnapshotCount = 0;
} else if (e.type === EventType.IncrementalSnapshot) {
// attch iframe should be considered as full snapshot
// attach iframe should be considered as full snapshot
if (
e.data.source === IncrementalSource.Mutation &&
e.data.isAttachIframe
Expand Down
Loading

0 comments on commit 8a9212f

Please sign in to comment.