Search in sources :

Example 21 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage 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)

Example 22 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method deletingDefaultComponents.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void deletingDefaultComponents() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderDeletingDefaultComponents");
    int rowComponents = builderPage.countRows();
    int titleComponents = builderPage.countTitles();
    int imageComponents = builderPage.countImages();
    builderPage.selectRowWithIndex(0);
    builderSidebar.clickDeleteButton();
    Assertion.assertEquals(rowComponents - 1, builderPage.countRows());
    builderPage.selectTitleWithIndex(0);
    builderSidebar.clickDeleteButton();
    Assertion.assertEquals(titleComponents - 1, builderPage.countTitles());
    builderPage.selectImageWithIndex(0);
    builderSidebar.clickDeleteButton();
    Assertion.assertEquals(imageComponents - 1, builderPage.countImages());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 23 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyIfInputFieldIsFocusedOnSelectItem.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyIfInputFieldIsFocusedOnSelectItem() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("Infobox_verify_focus");
    builderSidebar.addHeaderComponent();
    builderPage.selectRowWithIndex(0);
    Assertion.assertTrue(builderSidebar.isInputFieldPresent());
    Assertion.assertTrue(builderSidebar.isSidebarInputFieldFocused());
    builderPage.selectHeaderWithIndex(0);
    Assertion.assertTrue(builderSidebar.isInputFieldPresent());
    Assertion.assertTrue(builderSidebar.isSidebarInputFieldFocused());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 24 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifySidebarBackArrow.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.USER)
public void verifySidebarBackArrow() {
    Sidebar builderSidebar = new Sidebar();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("InfoboxBuilderVerifyInterfaceFunctionality");
    builderPage.selectRowWithIndex(0);
    builderSidebar.clickBackArrow();
    Assertion.assertTrue(builderSidebar.areAddButtonsPresent());
    builderPage.selectTitleWithIndex(0);
    builderSidebar.clickBackArrow();
    Assertion.assertTrue(builderSidebar.areAddButtonsPresent());
    builderPage.selectHeaderWithIndex(0);
    builderSidebar.clickBackArrow();
    Assertion.assertTrue(builderSidebar.areAddButtonsPresent());
    builderPage.selectImageWithIndex(0);
    builderSidebar.clickBackArrow();
    Assertion.assertTrue(builderSidebar.areAddButtonsPresent());
}
Also used : InfoboxBuilderPage(com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 25 with InfoboxBuilderPage

use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.

the class InfoboxBuilderTests method verifyLoadingEuropaTheme.

@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.STAFF)
public void verifyLoadingEuropaTheme() {
    new WikiFeatures().openWikiFeatures(wikiURL).enableEuropaInfoboxTheme();
    InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("Infobox_theme_europa");
    Assertion.assertEquals(builderPage.getInfoboxWidth(), EUROPA_INFOBOX_WIDTH);
}
Also used : 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)

Aggregations

InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)25 Test (org.testng.annotations.Test)25 Execute (com.wikia.webdriver.common.core.annotations.Execute)24 TemplatePage (com.wikia.webdriver.elements.oasis.pages.TemplatePage)5 WikiFeatures (com.wikia.webdriver.elements.oasis.pages.WikiFeatures)4 TemplateEditPage (com.wikia.webdriver.elements.oasis.pages.TemplateEditPage)3 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)1 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)1 WebElement (org.openqa.selenium.WebElement)1