use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class TestAdsFandomBtfBlock method adsFandomBtfBlockMobile.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "fandomBtfBlockPage", groups = { "AdsFandomBtfBlockMobile" })
public void adsFandomBtfBlockMobile(String article) {
AdsFandomObject fandomPage = loadPage(article);
fandomPage.triggerOnScrollSlots();
fandomPage.verifySlot(AdsFandomContent.TOP_LEADERBOARD);
fandomPage.verifySlot(AdsFandomContent.TOP_BOXAD_MOBILE);
Assertion.assertTrue(areBtfSlotsHidden(fandomPage), "BTF ads are displayed");
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class TestAdsFandomUap method adsFandomArticleUapMobile.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "fandomArticleUapPage", groups = { "AdsFandomUapMobile" })
@RelatedIssue(issueID = "ADEN-4339")
public void adsFandomArticleUapMobile(String pageType, String pageName, long atfId, long btfId) {
AdsFandomObject fandomPage = loadPage(pageName, pageType);
fandomPage.triggerOnScrollSlots();
verifyUapAtf(atfId, AdsFandomContent.TOP_BOXAD_MOBILE, fandomPage);
fandomPage.triggerOnScrollSlots();
verifyUapBtf(btfId, AdsFandomContent.INCONTENT_BOXAD_MOBILE, AdsFandomContent.BOTTOM_LEADERBOARD_MOBILE, fandomPage);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDelayBtfMercury.
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5, browser = Browser.CHROME)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "delayBtf", groups = "AdsBtfBlockingMercury")
@RelatedIssue(issueID = "ADEN-4344")
public void adsAtfDelayBtfMercury(String wikiName, String article, boolean isWgVarOn) throws InterruptedException {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, MOBILE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_AD_IN_CONTENT), AdsContent.MOBILE_AD_IN_CONTENT);
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_PREFOOTER), AdsContent.MOBILE_PREFOOTER);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDisableBtfMercury.
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5, browser = Browser.CHROME)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "disableBtf", groups = "AdsBtfBlockingMercury")
public void adsAtfDisableBtfMercury(String wikiName, String article, boolean isWgVarOn) {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, MOBILE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_TOP_LB), AdsContent.MOBILE_TOP_LB);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_AD_IN_CONTENT), isWgVarOn, AdsContent.MOBILE_AD_IN_CONTENT);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_PREFOOTER), isWgVarOn, AdsContent.MOBILE_PREFOOTER);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class TestAdsDfpParamsPresentMercury method dfpRubiconParamsPresentSyntheticMercury.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = MobileAdsDataProvider.class, dataProvider = "dfpRubiconParamsSynthetic", groups = { "MobileAds", "AdsDfpParamsPresentSyntheticMercury" })
public void dfpRubiconParamsPresentSyntheticMercury(String wikiName, String article, String queryString, String adUnit, String slot, String patternParam43tierPrice, String patternParam44tierPrice) {
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, SRC_MOBILE);
Assertion.assertTrue(ads.areRubiconDfpParamsPresent(currentGptSlotParams, patternParam43tierPrice, patternParam44tierPrice), currentGptSlotParams + " does not contains " + patternParam43tierPrice + " or " + patternParam44tierPrice);
ads.verifyGptAdInSlot(slot, LINE_ITEM_ID, CREATIVE_ID);
}
Aggregations