Search in sources :

Example 16 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsVuapTheNewGeneration method vuapDefaultStateAutoplayIsMutredAfrerReplayIsNotMuted.

@Test(groups = { "AdsVuapDefaultStateTng", "AdsVuapDefaultStateMuteOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapDefaultStateAutoplayIsMutredAfrerReplayIsNotMuted(Page page, String slot, String videoIframeSelector) {
    AdsBaseObject ads = openPageWithVideoInLocalStorage(page);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    scrollToSlot(slot, ads);
    VuapAssertions.verifyVideoUnmuteAndMute(vuap);
    VuapAssertions.verifyReplyButtonDisplayedAfterVideoEnds(vuap, MAX_AUTOPLAY_MOVIE_DURATION);
    vuap.replay();
    vuap.mute();
    VuapAssertions.verifyVideoUnmuteAndMute(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 17 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsVuapTheNewGeneration method vuapResolvedShouldEnd.

@Test(groups = { "AdsVuapResolvedStateTng", "AdsVuapResolvedEndOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapResolvedShouldEnd(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.verifyReplyButtonDisplayedAfterVideoEnds(vuap, MAX_AUTOPLAY_MOVIE_DURATION);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 18 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestDfpParamsPresent method dfpParamsPresentOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "dfpParams", groups = { "DfpParamsPresentOasis", "Ads" })
public void dfpParamsPresentOasis(String wikiName, String article, String adUnit, String slot, List<String> pageParams, List<String> slotParams) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    ads.verifyGptIframe(adUnit, slot, "gpt");
    ads.verifyGptParams(slot, pageParams, slotParams);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 19 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestDfpParamsPresent method dfpRubiconParamsPresentSyntheticOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "dfpRubiconParamsSynthetic", groups = { "DfpParamsPresentSyntheticOasis", "Ads" })
public void dfpRubiconParamsPresentSyntheticOasis(String wikiName, String article, String queryString, String adUnit, String slot, String patternParam2tierPrice, String patternParam57tierPrice) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    if (StringUtils.isNotEmpty(queryString)) {
        testedPage = urlBuilder.appendQueryStringToURL(testedPage, queryString);
    }
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    String currentGptSlotParams = ads.getGptParams(slot, "data-gpt-slot-params");
    ads.verifyGptIframe(adUnit, slot, "gpt");
    Assertion.assertTrue(ads.areRubiconDfpParamsPresent(currentGptSlotParams, patternParam2tierPrice, patternParam57tierPrice), currentGptSlotParams + " does not contains " + patternParam2tierPrice + " or " + patternParam57tierPrice);
    ads.verifyGptAdInSlot(slot, LINE_ITEM_ID, CREATIVE_ID);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 20 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestUap method adsUapOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsUapOasis", groups = "AdsUapOasis")
public void adsUapOasis(Page page, List<Map<String, Object>> atfSlots, List<Map<String, Object>> btfSlots) {
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    verifySlotsUnblocked(ads, atfSlots);
    verifySlotsBlocked(ads, btfSlots);
    ads.triggerComments();
    verifySlotsUnblocked(ads, ListUtils.union(atfSlots, btfSlots));
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Aggregations

AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)87 Test (org.testng.annotations.Test)79 AutoplayVuap (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap)29 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)12 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 UseUnstablePageLoadStrategy (com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)2 SonySideViewObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.SonySideViewObject)2 Dimension (org.openqa.selenium.Dimension)2 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)1 HarEntry (net.lightbody.bmp.core.har.HarEntry)1