use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.
the class TestAdsVuapOasis method adsVuapVideoPauseOasis.
@NetworkTrafficDump
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapVideoPauseOasis")
public void adsVuapVideoPauseOasis(Page page, String slotName, String iframeId) throws InterruptedException {
networkTrafficInterceptor.startIntercepting();
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
scrollToSlot(slotName, ads);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.play();
ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_FIRSTQUARTILE);
videoFanTakeover.pause();
double time = videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue();
Thread.sleep(DELAY * 1000);
Assert.assertNotEquals(0, videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue());
Assert.assertEquals(time, videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue());
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.
the class TestAdsVuapOasis method adsVuapCheckSlotSizesOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapCheckSlotSizesOasis")
public void adsVuapCheckSlotSizesOasis(Page page, String slotName, String iframeId) throws InterruptedException {
String slotSelector = AdsContent.getSlotSelector(slotName);
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
scrollToSlot(slotName, ads);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.waitForAdToLoad();
double imageHeight = videoFanTakeover.getAdSlotHeight(slotSelector);
videoFanTakeover.play();
double videoHeight = videoFanTakeover.getAdVideoHeight();
Assertion.assertTrue(videoFanTakeover.isVideoAdBiggerThanImageAdOasis(videoHeight, imageHeight));
videoFanTakeover.waitForVideoPlayerHidden();
Assertion.assertTrue(videoFanTakeover.isImageAdInCorrectSize(imageHeight, slotSelector));
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.
the class TestAdsVuapOasis method adsVideoClosedAfterPlayingOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVideoClosesWhenFinishPlaysOasis")
public void adsVideoClosedAfterPlayingOasis(Page page, String slotName, String iframeId) {
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
scrollToSlot(slotName, ads);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.play();
videoFanTakeover.waitForVideoPlayerHidden();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.
the class TestAdsVuapOasis method adsVuapTimeProgressingOasis.
@NetworkTrafficDump
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapTimeProgressingOasis")
public void adsVuapTimeProgressingOasis(Page page, String slotName, String iframeId) throws InterruptedException {
networkTrafficInterceptor.startIntercepting();
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
scrollToSlot(slotName, ads);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.play();
ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_FIRSTQUARTILE);
double quartileTime = videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue();
ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_MIDPOINT);
double midTime = videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue();
Assertion.assertTrue(videoFanTakeover.isTimeProgressing(quartileTime, midTime));
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.
the class TestAdsVuapFandom method adsImageClickedOpensNewPageFandomMobile.
@NetworkTrafficDump(useMITM = true)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPageMobile", groups = { "AdsVuapFandomMobile", "AdsImageClickedOpensNewPageFandomMobile" })
public void adsImageClickedOpensNewPageFandomMobile(String pageType, String pageName, String slotName, String iframeId, String videoUrl) {
networkTrafficInterceptor.startIntercepting();
AdsFandomObject fandomPage = loadPage(pageName, pageType);
VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
fandomPage.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
videoFandomPage(slotName).verifyFandomPageOpened(videoFanTakeover);
}
Aggregations