Skip to content

Commit

Permalink
speed up test-amp-video-analytics test (#33970)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyajones committed Apr 23, 2021
1 parent 1c2e9bf commit b920721
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions extensions/amp-video/0.1/test-e2e/test-amp-video-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ describes.endtoend(
await expect(isPaused(videoElem1)).to.be.false;
await expect(isPaused(videoElem2)).to.be.true;

// Sleep 5 seconds for the `video-percentage-played` event trigger
// Sleep 1 second for the `video-percentage-played` event trigger
// and the request to be sent
await sleep(5000);
await sleep(1000);
await expect(
'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking&id=myVideo'
).to.have.been.sent;
Expand All @@ -57,9 +57,9 @@ describes.endtoend(
await controller.click(playBtn2);
await expect(isPaused(videoElem1)).to.be.true;
await expect(isPaused(videoElem2)).to.be.false;
// Sleep 5 seconds for the `video-percentage-played` event trigger
// Sleep 1 second for the `video-percentage-played` event trigger
// and the request to be sent
await sleep(5000);
await sleep(1000);
await expect(
'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking&id=myVideo2'
).to.have.been.sent;
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/e2e/amp-video/analytics-triggers.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@
}
</script>
</amp-analytics>
<amp-video id="myVideo" src="/examples/av/ForBiggerJoyrides.mp4" width="358" height="204" layout="responsive">
<amp-video id="myVideo" src="/examples/av/ForBiggerJoyrides-short.mp4" width="358" height="204" layout="responsive">
<div placeholder>This is a placeholder</div>
<div fallback>This is a fallback</div>
</amp-video>

<amp-video id="myVideo2" src="/examples/av/ForBiggerJoyrides.mp4" width="358" height="204" layout="responsive">
<amp-video id="myVideo2" src="/examples/av/ForBiggerJoyrides-short.mp4" width="358" height="204" layout="responsive">
<div placeholder>This is a placeholder</div>
<div fallback>This is a fallback</div>
</amp-video>
Expand Down

0 comments on commit b920721

Please sign in to comment.