Search in sources :

Example 1 with AutoplayVuap

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap in project selenium-tests by Wikia.

the class TestAdsVuapResolvedState method vuapResolvedStateShouldStartPlayingAdvertisementAutomatically.

@Test(groups = "AdsVuapResolvedStateAutoplayOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapResolvedStateDesktop")
public void vuapResolvedStateShouldStartPlayingAdvertisementAutomatically(Page page, String slot, String videoIframeSelector) {
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    ads.refreshPage();
    VuapAssertions.verifyVideoPlay(vuap);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 2 with AutoplayVuap

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap in project selenium-tests by Wikia.

the class TestAdsVuapResolvedState method vuapResolvedStateAfterSecondPageView.

@Test(groups = "AdsVuapResolvedStateOnSecondPageView", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapResolvedStateDesktop")
public void vuapResolvedStateAfterSecondPageView(Page page, String slot, String videoIframeSelector) {
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    double defaultVideoHeight = vuap.getVideoHieghtWhilePaused();
    ads.refreshPage();
    Assert.assertTrue(vuap.isResolvedStateDisplayed(defaultVideoHeight, vuap.getVideoHieghtWhilePaused()));
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 3 with AutoplayVuap

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap in project selenium-tests by Wikia.

the class TestAdsVuapTheNewGeneration method vuapResolvedStateShouldProgressInTime.

@Test(groups = { "AdsVuapResolvedStateTng", "AdsVuapResolvedStateTimeProgressOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapResolvedStateShouldProgressInTime(Page page, String slot, String videoIframeSelector) {
    AdsBaseObject ads = openPageWithVideoInLocalStorage(page);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    ads.refreshPage();
    scrollToSlot(slot, ads);
    vuap.replay();
    VuapAssertions.verifyVideoTimeIsProgressing(vuap);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 4 with AutoplayVuap

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap in project selenium-tests by Wikia.

the class TestAdsVuapTheNewGeneration method vuapDefaultStateShouldHaveLinkToFandomArticleOnImage.

@Test(groups = { "AdsVuapDefaultStateTng", "AdsVuapDefaultStateClickOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapDefaultStateShouldHaveLinkToFandomArticleOnImage(Page page, String slot, String videoIframeSelector) {
    AdsBaseObject ads = openPageWithVideoInLocalStorage(page);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    scrollToSlot(slot, ads);
    vuap.clickOnClickArea4();
    final String actual = ads.switchToNewBrowserTab();
    Assert.assertTrue(actual.equals(FANDOM_ARTICLE_WESTWORLD_LINK), "Image should point to page on fandom.");
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 5 with AutoplayVuap

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap in project selenium-tests by Wikia.

the class TestAdsVuapTheNewGeneration method vuapResolvedStateAppearsOnSecondPageView.

@Test(groups = { "AdsVuapResolvedStateTng", "AdsVuapResolvedStateOnSecondPageView" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapResolvedStateAppearsOnSecondPageView(Page page, String slot, String videoIframeSelector) {
    AdsBaseObject ads = openPageWithVideoInLocalStorage(page);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    scrollToSlot(slot, ads);
    vuap.pause();
    double defaultVideoHeight = vuap.getVideoHieghtWhilePaused();
    ads.refreshPage();
    vuap.replay();
    vuap.pause();
    double resolvedVideoHeight = vuap.getVideoHieghtWhilePaused();
    Assert.assertTrue(vuap.isResolvedStateDisplayed(defaultVideoHeight, resolvedVideoHeight));
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Aggregations

AutoplayVuap (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap)29 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)29 Test (org.testng.annotations.Test)29