Search in sources :

Example 81 with InBrowser

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");
}
Also used : AdsFandomObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 82 with InBrowser

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);
}
Also used : AdsFandomObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 83 with InBrowser

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);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 84 with InBrowser

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);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 85 with InBrowser

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);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)184 Test (org.testng.annotations.Test)180 Execute (com.wikia.webdriver.common.core.annotations.Execute)146 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)13 MoreOptionsPopOver (com.wikia.webdriver.elements.mercury.components.discussions.common.MoreOptionsPopOver)12 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)12 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)11 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)10 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)9 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)7 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)7 PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)6 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5