Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeouts - now 60000 ms #672

Merged
merged 8 commits into from
Jun 22, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IMA SDK Plugin for Video.js

[![Build Status](https://travis-ci.org/googleads/videojs-ima.svg?branch=master)](https://travis-ci.org/googleads/videojs-ima)
-[![Build Status](https://travis-ci.org/googleads/videojs-ima.svg?branch=master)](https://travis-ci.org/googleads/videojs-ima) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=N1g3U09HWEhZR09OSVc2YmhiWFlGaExMQmswMmo0Z1F3NVRjT0VvZCtWST0tLUo0QUdnZ1gyMmhJUHZsRGJ3dTBpWWc9PQ==--b8066916a46dd2f255b416f80f40ca7c3518ad46)](https://www.browserstack.com/automate/public-build/N1g3U09HWEhZR09OSVc2YmhiWFlGaExMQmswMmo0Z1F3NVRjT0VvZCtWST0tLUo0QUdnZ1gyMmhJUHZsRGJ3dTBpWWc9PQ==--b8066916a46dd2f255b416f80f40ca7c3518ad46)

## Introduction
The IMA SDK Plugin for Video.js provides a quick and easy IMA SDK integration
Expand Down
43 changes: 25 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"eslint": "^4.11.0",
"eslint-config-google": "^0.9.1",
"eslint-plugin-jsdoc": "^3.2.0",
"geckodriver": "^1.10.0",
"geckodriver": "^1.11.0",
"http-server": "^0.10.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
Expand Down
30 changes: 15 additions & 15 deletions test/webdriver/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,79 +49,79 @@ browsers.browsers.forEach(function(browser) {
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=linear');
await driver.findElement(By.id('content_video')).click();
let log = await driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 20000);
await driver.wait(until.elementTextContains(log, 'start'), 60000);
await driver.wait(until.elementIsVisible(driver.findElement(
By.id('content_video_ima-controls-div'))), 25000);
By.id('content_video_ima-controls-div'))), 60000);
});

it( 'Hides controls when ad ends ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=linear');
await driver.findElement(By.id('content_video')).click();
let log = await driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 20000);
await driver.wait(until.elementTextContains(log, 'start'), 60000);
await driver.wait(until.elementIsNotVisible(driver.findElement(
By.id('content_video_ima-controls-div'))), 24000);
By.id('content_video_ima-controls-div'))), 60000);
await driver.sleep();
});

it( 'Plays content when ad ends ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=linear');
await driver.findElement(By.id('content_video')).click();
let log = await driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 20000);
await driver.wait(until.elementTextContains(log, 'start'), 60000);
await driver.wait(until.elementIsNotVisible(driver.findElement(
By.id('content_video_ima-controls-div'))), 24000);
await driver.wait(until.elementTextContains(log, 'playing'), 20000);
By.id('content_video_ima-controls-div'))), 60000);
await driver.wait(until.elementTextContains(log, 'playing'), 60000);
await driver.sleep();
});

it( 'Displays skip ad button ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=skippable');
await driver.findElement(By.id('content_video')).click();
let log = driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 20000);
await driver.wait(until.elementTextContains(log, 'start'), 60000);
await driver.switchTo().frame(driver.findElement(
By.css('#content_video_ima-ad-container > div:nth-child(1) > iframe')));
let skipButton = await driver.findElement(
By.css('body > div.videoAdUi > div.videoAdUiSkipContainer.html5-stop-propagation > button'));
await driver.wait(until.elementIsVisible(skipButton), 20000);
await driver.wait(until.elementIsVisible(skipButton), 60000);
await driver.sleep();
});

it( 'VMAP: Preroll ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=vmap_preroll');
await driver.findElement(By.id('content_video')).click();
let log = await driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 20000);
await driver.wait(until.elementTextContains(log, 'start'), 60000);
await driver.wait(until.elementIsVisible(driver.findElement(
By.id('content_video_ima-controls-div'))), 20000);
By.id('content_video_ima-controls-div'))), 60000);
await driver.sleep();
});

it( 'VMAP: Midroll ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=vmap_midroll');
await driver.findElement(By.id('content_video')).click();
await driver.wait(until.elementIsVisible(driver.findElement(
By.id('content_video_ima-controls-div'))), 20000);
By.id('content_video_ima-controls-div'))), 60000);
await driver.sleep();
});

it( 'Nonlinear ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=nonlinear');
await driver.findElement(By.id('content_video')).click();
let log = await driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 20000);
await driver.wait(until.elementTextContains(log, 'start'), 60000);
await driver.switchTo().frame(driver.findElement(
By.css('#content_video_ima-ad-container > div:nth-child(1) > iframe')));
await driver.wait(until.elementIsVisible(driver.findElement(
By.id('GDFP'))), 20000);
By.id('GDFP'))), 60000);
await driver.sleep();
});

it( 'Handles ad error 303: wrappers ' + browser.name, async function(){
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=error_303');
let log = await driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, '303'), 20000);
await driver.wait(until.elementTextContains(log, '303'), 60000);
await driver.sleep();
});
});
Expand Down
22 changes: 22 additions & 0 deletions test/webdriver/content/capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ var browsers = [
'moz:firefoxOptions' : {args: ['-headless']}
}
},
{
name: 'browserstack-win10-chrome',
server: 'http://hub-cloud.browserstack.com/wd/hub',
capabilities: {
'browserName' : 'Chrome',
'browser_version' : '62.0',
'os' : 'Windows',
'os_version' : '10',
'resolution' : '1024x768',
}
},
{
name: 'browserstack-win10-firefox',
server: 'http://hub-cloud.browserstack.com/wd/hub',
capabilities: {
'browserName' : 'Firefox',
'browser_version' : '58.0',
'os' : 'Windows',
'os_version' : '10',
'resolution' : '1024x768',
}
},
];

for (let browser of browsers) {
Expand Down