use of com.wikia.webdriver.elements.oasis.pages.TemplatePage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyInfoboxPreviewTheme.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.STAFF)
public void verifyInfoboxPreviewTheme() {
InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
SpecialThemeDesignerPageObject themeDesigner = new SpecialThemeDesignerPageObject(driver);
TemplatePage template = new TemplatePage();
new WikiFeatures().openWikiFeatures(wikiURL).enableEuropaInfoboxTheme();
themeDesigner.openSpecialDesignerPage(wikiURL).selectTheme(0);
themeDesigner.submitTheme();
String templateBgColor = template.open(PageContent.INFOBOX_2).getPageBackgroundColor();
String previewBgColor = builderPage.openExisting("InfoboxBuilderVerifyInfoboxTheme").getPreviewBackgroundColor();
Assertion.assertEquals(previewBgColor, templateBgColor);
themeDesigner.openSpecialDesignerPage(wikiURL).selectTheme(2);
themeDesigner.submitTheme();
templateBgColor = template.open(PageContent.INFOBOX_2).getPageBackgroundColor();
previewBgColor = builderPage.openExisting("InfoboxBuilderVerifyInfoboxTheme").getPreviewBackgroundColor();
Assertion.assertEquals(templateBgColor, previewBgColor);
}
use of com.wikia.webdriver.elements.oasis.pages.TemplatePage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method customizingComponents.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void customizingComponents() {
TemplatePage template = new TemplatePage();
Sidebar builderSidebar = new Sidebar();
String labelText = "AutomatedTest";
String labelLongText = "AutomatedTestVeryLongName";
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("InfoboxBuilderCustomizingComponents").selectHeaderWithIndex(0);
builderSidebar.changeHeaderCollapsibilityState();
builderPage.selectRowWithIndex(0);
builderSidebar.typeInInputField(labelText);
Assertion.assertEquals(builderPage.getLabelText(0), labelText);
builderPage.selectRowWithIndex(1);
builderSidebar.typeInInputField(labelLongText);
Assertion.assertEquals(builderPage.getLabelText(1), labelLongText);
Assertion.assertEquals(builderPage.getLabelCssValue(1, "word-wrap"), "break-word");
new Subhead().clickPublish();
Assertion.assertTrue(template.isTemplatePagePresent());
String infoboxTitle = template.getPortableInfobox().getTitleTextWithIndex(0);
Assertion.assertEquals("InfoboxBuilderCustomizingComponents", infoboxTitle);
}
Aggregations