use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.
the class PortableInfoboxTests method verifyInfoboxLayoutChange.
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.STAFF)
public void verifyInfoboxLayoutChange() {
new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
PortableInfobox infobox = new PortableInfobox();
SpecialThemeDesignerPageObject theme = new SpecialThemeDesignerPageObject(driver);
theme.openSpecialDesignerPage(wikiURL).selectTheme(4);
theme.submitTheme();
infobox.open(PageContent.INFOBOX_2);
new ArticlePurger().purgeArticleAsLoggedUser();
String oldBackground = infobox.getBackgroundColor();
theme.openSpecialDesignerPage(wikiURL).selectTheme(1);
theme.submitTheme();
infobox.open(PageContent.INFOBOX_2);
new ArticlePurger().purgeArticleAsLoggedUser();
Assertion.assertNotEquals(oldBackground, infobox.getBackgroundColor());
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.
the class InfoboxBuilderTests method immutableSources.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void immutableSources() {
InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
String labelText = "AutomatedTest";
builderPage.openExisting("InfoboxBuilderImmutableRows").selectRowWithIndex(0);
new Sidebar().typeInInputField(labelText);
Assertion.assertEquals(builderPage.getLabelText(0), labelText);
new Subhead().clickPublish();
String invocationLabelText = new PortableInfobox().open("InfoboxBuilderImmutableExample").getDataLabelTextWithIndex(0);
Assertion.assertEquals("AutomatedTest", invocationLabelText);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.
the class TestAdsSlotsMercury method adsLeaderboardOnPageWithInfobox.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "leaderboardSlotOnPageWithInfobox")
public void adsLeaderboardOnPageWithInfobox(String wikiName, String article, String adUnit) {
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
PortableInfobox infobox = new PortableInfobox();
ads.waitForPageLoadedWithGpt();
ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
int adPosition = ads.getElementTopPositionByCssSelector(AdsContent.getSlotSelector(AdsContent.MOBILE_TOP_LB));
int pageElementPosition = infobox.getElementBottomPositionByCssSelector(PORTABLE_INFOBOX);
PageObjectLogging.log("Ad top position", String.valueOf(adPosition), true);
PageObjectLogging.log("Infobox bottom position", String.valueOf(pageElementPosition), true);
Assertion.assertTrue(adPosition >= pageElementPosition, "Verify if ad top position is >= infobox bottom position (ad below infobox)");
}
Aggregations