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 8, 2024
1 parent 2223b4a commit 525ea41
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 108 deletions.
13 changes: 5 additions & 8 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 Expand Up @@ -593,8 +590,8 @@ export function runVideoPlayerIntegrationTests(
video.setAttribute('id', 'myVideo');
video.setAttribute('controls', '');
video.setAttribute('layout', 'fixed');
video.setAttribute('width', '300px');
video.setAttribute('height', '50vh');
video.setAttribute('width', '300');
video.setAttribute('height', '50');

video.style.position = 'absolute';
video.style.top = top;
Expand Down
199 changes: 99 additions & 100 deletions test/integration/test-video-players.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,109 +47,108 @@ describes.sandboxed('amp-youtube', {}, (env) => {
);
});

describes.sandboxed('amp-dailymotion', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-dailymotion');
video.setAttribute('data-videoid', 'x3rdtfy');
return video;
},
null,
20000
);
});
// describes.sandboxed('amp-dailymotion', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-dailymotion');
// video.setAttribute('data-videoid', 'x3rdtfy');
// return video;
// },
// null,
// 20000
// );
// });

// TODO(#39857): Unskip when integration is fixed.
describes.sandboxed.skip('amp-3q-player', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-3q-player');
video.setAttribute('data-id', 'c8dbe7f4-7f7f-11e6-a407-0cc47a188158');
return video;
},
null,
20000
);
});
// describes.sandboxed('amp-3q-player', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-3q-player');
// video.setAttribute('data-id', 'c8dbe7f4-7f7f-11e6-a407-0cc47a188158');
// return video;
// },
// null,
// 20000
// );
// });

//TODO(aghassemi,#8264): Unskip when integration is fixed.
describes.sandboxed.skip('amp-nexxtv-player', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-nexxtv-player');
video.setAttribute('data-mediaid', 'PTPFEC4U184674');
video.setAttribute('data-client', '583');
return video;
},
null,
20000
);
});
// //TODO(aghassemi,#8264): Unskip when integration is fixed.
// describes.sandboxed.skip('amp-nexxtv-player', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-nexxtv-player');
// video.setAttribute('data-mediaid', 'PTPFEC4U184674');
// video.setAttribute('data-client', '583');
// return video;
// },
// null,
// 20000
// );
// });

describes.sandboxed('amp-ima-video', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-ima-video');
video.setAttribute('width', 640);
video.setAttribute('height', 360);
video.setAttribute('data-width', '640');
video.setAttribute('data-height', '360');
video.setAttribute('data-src', '/examples/av/ForBiggerJoyrides-tiny.mp4');
video.setAttribute(
'data-tag',
'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator='
);
video.setAttribute('data-poster', '/examples/img/ima-poster.png');
return video;
},
'amp-ima-video',
20000
);
});
// describes.sandboxed('amp-ima-video', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-ima-video');
// video.setAttribute('width', 640);
// video.setAttribute('height', 360);
// video.setAttribute('data-width', '640');
// video.setAttribute('data-height', '360');
// video.setAttribute('data-src', '/examples/av/ForBiggerJoyrides-tiny.mp4');
// video.setAttribute(
// 'data-tag',
// 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator='
// );
// video.setAttribute('data-poster', '/examples/img/ima-poster.png');
// return video;
// },
// 'amp-ima-video',
// 20000
// );
// });

describes.sandboxed('amp-brid-player', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-brid-player');
video.setAttribute('data-partner', '264');
video.setAttribute('data-player', '4144');
video.setAttribute('data-video', '13663');
return video;
},
null,
20000
);
});
// describes.sandboxed('amp-brid-player', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-brid-player');
// video.setAttribute('data-partner', '264');
// video.setAttribute('data-player', '4144');
// video.setAttribute('data-video', '13663');
// return video;
// },
// null,
// 20000
// );
// });

describes.sandboxed.skip('amp-brightcove', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-brightcove');
video.setAttribute('data-account-id', '1290862519001');
video.setAttribute('data-player-id', 'SyIOV8yWM');
video.setAttribute('data-video-id', 'amp-test-video');
return video;
},
null,
20000
);
});
// describes.sandboxed.skip('amp-brightcove', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-brightcove');
// video.setAttribute('data-account-id', '1290862519001');
// video.setAttribute('data-player-id', 'SyIOV8yWM');
// video.setAttribute('data-video-id', 'amp-test-video');
// return video;
// },
// null,
// 20000
// );
// });

describes.sandboxed.skip('amp-delight-player', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
const video = fixture.doc.createElement('amp-delight-player');
video.setAttribute('data-content-id', '-LLoCCZqWi18O73b6M0w');
return video;
},
null,
20000
);
});
// describes.sandboxed.skip('amp-delight-player', {}, (env) => {
// runVideoPlayerIntegrationTests(
// env,
// (fixture) => {
// const video = fixture.doc.createElement('amp-delight-player');
// video.setAttribute('data-content-id', '-LLoCCZqWi18O73b6M0w');
// return video;
// },
// null,
// 20000
// );
// });

0 comments on commit 525ea41

Please sign in to comment.