Search in sources :

Example 6 with TemplatePage

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);
}
Also used : TemplatePage(com.wikia.webdriver.elements.oasis.pages.TemplatePage) SpecialThemeDesignerPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject) WikiFeatures(com.wikia.webdriver.elements.oasis.pages.WikiFeatures) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 7 with TemplatePage

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);
}
Also used : TemplatePage(com.wikia.webdriver.elements.oasis.pages.TemplatePage) InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

TemplatePage (com.wikia.webdriver.elements.oasis.pages.TemplatePage)7 Test (org.testng.annotations.Test)7 Execute (com.wikia.webdriver.common.core.annotations.Execute)5 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)5 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)1 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)1 TemplateClassification (com.wikia.webdriver.elements.oasis.components.templateclassificiation.TemplateClassification)1 WikiFeatures (com.wikia.webdriver.elements.oasis.pages.WikiFeatures)1 AceEditor (com.wikia.webdriver.pageobjectsfactory.componentobject.AceEditor)1 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)1 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)1 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)1