Skip to content

Commit

Permalink
test(Ads): Test quartile interstitials events (#7688)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Dec 4, 2024
1 parent 0355376 commit aa6b28e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/ads_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand All @@ -227,6 +233,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand All @@ -249,6 +261,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand All @@ -258,6 +276,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand All @@ -278,6 +302,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand All @@ -287,6 +317,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand Down Expand Up @@ -378,6 +414,12 @@ describe('Ads', () => {
// Wait a maximum of 10 seconds before the ad starts playing.
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_STARTED);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_FIRST_QUARTILE);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_MIDPOINT);
await waiter.timeoutAfter(10)
.waitForEvent(adManager, shaka.ads.Utils.AD_THIRD_QUARTILE);
await waiter.timeoutAfter(20)
.waitForEvent(adManager, shaka.ads.Utils.AD_STOPPED);

Expand Down

0 comments on commit aa6b28e

Please sign in to comment.