use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsSlotsOasis method adsSmokeTestSlotsOasis.
@Test(groups = "TestSlotsOasis")
public void adsSmokeTestSlotsOasis() {
String testedPage = urlBuilder.getUrlForPath("project43", "SyntheticTests/OasisSlots");
ads = new AdsBaseObject(driver, testedPage);
ads.waitForPageLoadedWithGpt();
for (String slotName : AdsDataProvider.OASIS_SLOTS_TO_SMOKE_TEST) {
smokeTestSlot(slotName);
}
Assertion.assertFalse(ads.checkSlotOnPageLoaded(AdsContent.BOTTOM_LB));
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsTrackingPixels method adsTrackingPixelSentAuthPage.
@NetworkTrafficDump(useMITM = true)
@Test(groups = "AdsTrackingPixelsAuthPage", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsSentAuthPage")
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@DontRun(env = { "preview", "sandbox" })
public void adsTrackingPixelSentAuthPage(String wiki, String page, String[] pixelUrls) {
networkTrafficInterceptor.startIntercepting();
String testedPage = urlBuilder.getUrlForWiki(wiki) + page;
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
assertTrackingPixelsSent(adsBaseObject, pixelUrls);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVelesTracking method adsTrackingVelesTracked.
@NetworkTrafficDump()
@Test(groups = "AdsTrackingVeles", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVelesTracking")
public void adsTrackingVelesTracked(final Page page, final Map<String, String> positionsAndPrices) {
networkTrafficInterceptor.startIntercepting();
AdsBaseObject pageObject = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
Set<HarEntry> entries = findEntriesByUrlPart(pageObject, VELES_TRACKING_REQUEST_PART, positionsAndPrices);
Assertion.assertTrue(wasVelesTrackedIn(entries, positionsAndPrices), "Veles should be tracked only in " + positionsAndPrices);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsSlotSizes method adsSlotSizes.
private void adsSlotSizes(Page page, String urlParamToEnable, Dimension pageSize, Map<String, Object> slotInfo) {
String slotName = slotInfo.get("slotName").toString();
Dimension slotSize = (Dimension) slotInfo.get("slotSize");
String url = urlBuilder.getUrlForPage(page);
if (StringUtils.isNotEmpty(urlParamToEnable)) {
url = urlBuilder.appendQueryStringToURL(url, urlParamToEnable);
}
log(slotName, slotSize);
new AdsBaseObject(driver, url, pageSize).triggerAdSlot(slotName).verifyLineItemId(slotName, Integer.valueOf(slotInfo.get("lineItemId").toString())).verifyIframeSize(slotName, slotInfo.get("src").toString(), slotSize.getWidth(), slotSize.getHeight());
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapMercury method adsVuapVideoPauseMercury.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapVideoPauseMercury")
public void adsVuapVideoPauseMercury(Page page, String slotName, String iframeId, String videoUrl) throws InterruptedException {
networkTrafficInterceptor.startIntercepting();
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
scrollToSlot(slotName, ads);
ads.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.play();
ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_FIRSTQUARTILE);
videoFanTakeover.pause();
double time = videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue();
TimeUnit.SECONDS.sleep(DELAY);
Assert.assertNotEquals(0, videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue());
Assert.assertEquals(time, videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue());
}
Aggregations