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);
}
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());
}
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());
}
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());
}
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);
}
Aggregations