use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyLoadingDefaultTheme.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.STAFF)
public void verifyLoadingDefaultTheme() {
new WikiFeatures().openWikiFeatures(wikiURL).disableEuropaInfoboxTheme();
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("Infobox_theme_default");
Assertion.assertEquals(builderPage.getInfoboxWidth(), DEFAULT_INFOBOX_WIDTH);
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method deletingAddedComponents.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void deletingAddedComponents() {
Sidebar builderSidebar = new Sidebar();
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderDeletingAddedComponents");
int rowComponents = builderPage.countRows();
int titleComponents = builderPage.countTitles();
int imageComponents = builderPage.countImages();
int headerComponents = builderPage.countHeaders();
builderSidebar.addImageComponent().addTitleComponent().addRowComponent().addHeaderComponent();
/* deleting last (newly added) components */
builderPage.selectRowWithIndex(builderPage.countRows() - 1);
builderSidebar.clickDeleteButton();
Assertion.assertEquals(rowComponents, builderPage.countRows());
builderPage.selectTitleWithIndex(builderPage.countTitles() - 1);
builderSidebar.clickDeleteButton();
Assertion.assertEquals(titleComponents, builderPage.countTitles());
builderPage.selectImageWithIndex(builderPage.countImages() - 1);
builderSidebar.clickDeleteButton();
Assertion.assertEquals(imageComponents, builderPage.countImages());
builderPage.selectHeaderWithIndex(builderPage.countImages() - 1);
builderSidebar.clickDeleteButton();
Assertion.assertEquals(headerComponents, builderPage.countHeaders());
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyGoToSourceEditorNonEditedInfobox.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyGoToSourceEditorNonEditedInfobox() {
new InfoboxBuilderPage().openExisting("InfoboxBuilderSavingTemplate");
new Sidebar().clickGoToSourceButton();
Assertion.assertTrue(new TemplateEditPage().isEditAreaDisplayed());
Assertion.assertTrue(driver.getCurrentUrl().contains("InfoboxBuilderSavingTemplate"));
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyOtherContentIsNotChanged.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
public void verifyOtherContentIsNotChanged() {
Sidebar builderSidebar = new Sidebar();
final String templateName = "Infobox_other_content";
final String infoboxRegexp = "(?s)<infobox[^>]*>.*</infobox>";
String beforePublish = new TemplatePage().getRawContent(templateName).replaceAll(infoboxRegexp, "");
new TemplatePage().open(templateName).loginAs(User.USER_4);
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting(templateName);
builderSidebar.addRowComponent();
builderPage.selectRowWithIndex(0);
builderSidebar.clickDeleteButton();
new Subhead().clickPublish();
builderPage.logOut();
String afterPublish = new TemplatePage().getRawContent(templateName).replaceAll(infoboxRegexp, "");
Assert.assertEquals(beforePublish, afterPublish);
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyChevronTooltip.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_004" })
@Execute(asUser = User.USER)
public void verifyChevronTooltip() {
Sidebar builderSidebar = new Sidebar();
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("InfoboxBuilderChevronPopup");
Assertion.assertTrue(builderPage.isSectionTooltipPresentBelow(0));
Assertion.assertTrue(builderPage.isSectionTooltipPresentAbove(1));
builderSidebar.addHeaderComponent();
builderPage.selectHeaderWithIndex(2);
builderSidebar.changeHeaderCollapsibilityState();
Assertion.assertTrue(builderPage.isSectionTooltipPresentAbove(2));
}
Aggregations