Skip to content

Commit

Permalink
WIP Reenable flaky video test
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq committed Oct 4, 2024
1 parent 2223b4a commit a3b7af9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/integration/test-video-players-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ export function runVideoPlayerIntegrationTests(
});
});

// TODO(#40115): fix this flaky test
it.skip('should trigger pause analytics when the video pauses', function () {
it('should trigger pause analytics when the video pauses', function () {
let pauseButton;

return getVideoPlayer({
Expand All @@ -202,8 +201,7 @@ export function runVideoPlayerIntegrationTests(
});
});

// TODO(#40115): fix this flaky test
it.skip('should trigger session analytics when a session ends', function () {
it('should trigger session analytics when a session ends', function () {
let pauseButton;

return getVideoPlayer({
Expand Down Expand Up @@ -381,8 +379,7 @@ export function runVideoPlayerIntegrationTests(
this.timeout(timeout);

describe('play/pause', () => {
// TODO(#40115): fix this flaky test
it.skip('should play when in view port initially', () => {
it('should play when in view port initially', () => {
return getVideoPlayer({outsideView: false, autoplay: true}).then(
(r) => {
return listenOncePromise(r.video, VideoEvents_Enum.PLAYING);
Expand Down
18 changes: 18 additions & 0 deletions test/integration/test-video-players.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describes.sandboxed('amp-video', {}, (env) => {
runVideoPlayerIntegrationTests(env, (fixture) => {
const video = fixture.doc.createElement('amp-video');
video.setAttribute('src', '/examples/av/ForBiggerJoyrides-tiny.mp4');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
});
});
Expand All @@ -25,6 +27,8 @@ describes.sandboxed('amp-video-iframe', {}, (env) => {
env,
(fixture) => {
const video = fixture.doc.createElement('amp-video-iframe');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
video.setAttribute('src', '/examples/amp-video-iframe/frame.html');
video.setAttribute('poster', 'https://placekitten.com/800/450');
return video;
Expand All @@ -40,6 +44,8 @@ describes.sandboxed('amp-youtube', {}, (env) => {
(fixture) => {
const video = fixture.doc.createElement('amp-youtube');
video.setAttribute('data-videoid', 'O0QDEXZhow4');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand All @@ -53,6 +59,8 @@ describes.sandboxed('amp-dailymotion', {}, (env) => {
(fixture) => {
const video = fixture.doc.createElement('amp-dailymotion');
video.setAttribute('data-videoid', 'x3rdtfy');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand All @@ -67,6 +75,8 @@ describes.sandboxed.skip('amp-3q-player', {}, (env) => {
(fixture) => {
const video = fixture.doc.createElement('amp-3q-player');
video.setAttribute('data-id', 'c8dbe7f4-7f7f-11e6-a407-0cc47a188158');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand All @@ -82,6 +92,8 @@ describes.sandboxed.skip('amp-nexxtv-player', {}, (env) => {
const video = fixture.doc.createElement('amp-nexxtv-player');
video.setAttribute('data-mediaid', 'PTPFEC4U184674');
video.setAttribute('data-client', '583');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand Down Expand Up @@ -119,6 +131,8 @@ describes.sandboxed('amp-brid-player', {}, (env) => {
video.setAttribute('data-partner', '264');
video.setAttribute('data-player', '4144');
video.setAttribute('data-video', '13663');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand All @@ -134,6 +148,8 @@ describes.sandboxed.skip('amp-brightcove', {}, (env) => {
video.setAttribute('data-account-id', '1290862519001');
video.setAttribute('data-player-id', 'SyIOV8yWM');
video.setAttribute('data-video-id', 'amp-test-video');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand All @@ -147,6 +163,8 @@ describes.sandboxed.skip('amp-delight-player', {}, (env) => {
(fixture) => {
const video = fixture.doc.createElement('amp-delight-player');
video.setAttribute('data-content-id', '-LLoCCZqWi18O73b6M0w');
video.setAttribute('width', '100');
video.setAttribute('height', '100');
return video;
},
null,
Expand Down

0 comments on commit a3b7af9

Please sign in to comment.