Skip to content

Commit 02b9852

Browse files
authored
test: Re-enable browserstack tests, 2nd attempt. (#657)
* test: increased browserstack test timeout values * test: upped first tests time
1 parent 8dab561 commit 02b9852

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

test/webdriver/basic.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,79 +49,79 @@ browsers.browsers.forEach(function(browser) {
4949
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=linear');
5050
await driver.findElement(By.id('content_video')).click();
5151
let log = await driver.findElement(By.id('log'));
52-
await driver.wait(until.elementTextContains(log, 'start'), 10000);
52+
await driver.wait(until.elementTextContains(log, 'start'), 20000);
5353
await driver.wait(until.elementIsVisible(driver.findElement(
54-
By.id('content_video_ima-controls-div'))), 10000);
54+
By.id('content_video_ima-controls-div'))), 25000);
5555
});
5656

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

6767
it( 'Plays content when ad ends ' + browser.name, async function(){
6868
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=linear');
6969
await driver.findElement(By.id('content_video')).click();
7070
let log = await driver.findElement(By.id('log'));
71-
await driver.wait(until.elementTextContains(log, 'start'), 10000);
71+
await driver.wait(until.elementTextContains(log, 'start'), 20000);
7272
await driver.wait(until.elementIsNotVisible(driver.findElement(
73-
By.id('content_video_ima-controls-div'))), 14000);
74-
await driver.wait(until.elementTextContains(log, 'playing'), 10000);
73+
By.id('content_video_ima-controls-div'))), 24000);
74+
await driver.wait(until.elementTextContains(log, 'playing'), 20000);
7575
await driver.sleep();
7676
});
7777

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

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

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

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

121121
it( 'Handles ad error 303: wrappers ' + browser.name, async function(){
122122
await driver.get('http://localhost:8000/test/webdriver/index.html?ad=error_303');
123123
let log = await driver.findElement(By.id('log'));
124-
await driver.wait(until.elementTextContains(log, '303'), 10000);
124+
await driver.wait(until.elementTextContains(log, '303'), 20000);
125125
await driver.sleep();
126126
});
127127
});

test/webdriver/content/ads.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ var options = {
5151
disableFlagAds: true,
5252
adTagUrl: adTags[adTagName],
5353
adsManagerLoadedCallback: onAdsManagerLoaded,
54-
debug: true
54+
debug: true,
55+
vastLoadTimeout: 15000
5556
};
5657

5758
player.ima(options);

test/webdriver/content/capabilities.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var browsers = [
4545
'moz:firefoxOptions' : {args: ['-headless']}
4646
}
4747
},
48-
/*{
48+
{
4949
name: 'browserstack-win10-chrome',
5050
server: 'http://hub-cloud.browserstack.com/wd/hub',
5151
capabilities: {
@@ -66,7 +66,7 @@ var browsers = [
6666
'os_version' : '10',
6767
'resolution' : '1024x768',
6868
}
69-
},*/
69+
},
7070
];
7171

7272
for (let browser of browsers) {

0 commit comments

Comments
 (0)