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 5, 2024
1 parent 2223b4a commit 8254d3b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 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
29 changes: 14 additions & 15 deletions test/integration/test-video-players.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@

import {runVideoPlayerIntegrationTests} from './test-video-players-helper';

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

describes.sandboxed('amp-video', {}, (env) => {
runVideoPlayerIntegrationTests(env, (fixture) => {
const video = fixture.doc.createElement('amp-video');
Expand All @@ -34,19 +47,6 @@ describes.sandboxed('amp-video-iframe', {}, (env) => {
);
});

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

describes.sandboxed('amp-dailymotion', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
Expand All @@ -60,8 +60,7 @@ describes.sandboxed('amp-dailymotion', {}, (env) => {
);
});

// TODO(#39857): Unskip when integration is fixed.
describes.sandboxed.skip('amp-3q-player', {}, (env) => {
describes.sandboxed('amp-3q-player', {}, (env) => {
runVideoPlayerIntegrationTests(
env,
(fixture) => {
Expand Down

0 comments on commit 8254d3b

Please sign in to comment.