Skip to content

Commit

Permalink
add slow render test
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Oct 21, 2020
1 parent f3fc057 commit 68ba469
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fixtures/slow-render.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html>
<body>
<script>
setTimeout(() => {
let el = document.createElement('div')
el.innerText = 'ok'
document.body.appendChild(el)
}, 1000)
</script>
</body>
</html>
5 changes: 5 additions & 0 deletions page_eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,8 @@ func (t T) ConcurrentEval() {
t.Gt(duration, 1000*time.Millisecond)
t.Eq([]int{<-list, <-list}, []int{1, 2})
}

func (t T) PageSlowRender() {
p := t.page.MustNavigate(t.srcFile("./fixtures/slow-render.html"))
t.Eq(p.MustElement("div").MustText(), "ok")
}

0 comments on commit 68ba469

Please sign in to comment.