use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyGoToSourceEditorSaveChanges.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_003" })
@Execute(asUser = User.USER)
public void verifyGoToSourceEditorSaveChanges() {
Sidebar builderSidebar = new Sidebar();
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openExisting("Infobox_verify_go_to_source_save_changes");
builderSidebar.addRowComponent();
builderPage.selectRowWithIndex(1);
builderSidebar.clickDeleteButton().clickGoToSourceButton();
Assertion.assertTrue(builderPage.isGoToSourceModalPresent());
builderPage.clickSaveChangesButton();
TemplateEditPage template = new TemplateEditPage();
Assert.assertTrue(template.isEditAreaDisplayed());
Assert.assertFalse(template.isEditAreaEmpty());
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyDefaultStructure.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void verifyDefaultStructure() {
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderVerifyDefaultStructure");
Assertion.assertEquals(builderPage.countTitles(), 1);
Assertion.assertEquals(builderPage.countImages(), 1);
Assertion.assertEquals(builderPage.countRows(), 2);
Assertion.assertEquals(builderPage.countHeaders(), 0);
builderPage.selectTitleWithIndex(0);
Assertion.assertTrue(new Sidebar().isTitleUsingArticleName());
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method savingTemplate.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void savingTemplate() {
Sidebar builderSidebar = new Sidebar();
InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
String templateName = "InfoboxBuilderSavingTemplate";
builderPage.openExisting(templateName).selectRowWithIndex(0);
builderSidebar.clickDeleteButton();
builderSidebar.addRowComponent();
new Subhead().clickPublish();
Assertion.assertEquals(templateName.toLowerCase(), new TemplatePage().getHeaderText().toLowerCase());
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method verifyScrolling.
/*
* Verify if scrolling is enabled when Infobox's height in preview is greater than the preview
* area height.
*/
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_002" })
@Execute(asUser = User.USER)
public void verifyScrolling() {
InfoboxBuilderPage builderPage = new InfoboxBuilderPage();
new InfoboxBuilderPage().openExisting("InfoboxBuilderVerifyScrolling");
new Sidebar().addImageComponent().addImageComponent().addImageComponent().addImageComponent();
builderPage.verifyScrollbarIsVisible().moveToLastComponent();
}
use of com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage in project selenium-tests by Wikia.
the class InfoboxBuilderTests method deletingDefaultComponentsUsingPopUp.
@Test(groups = { "InfoboxBuilderTests", "InfoboxBuilder_001" })
@Execute(asUser = User.USER)
public void deletingDefaultComponentsUsingPopUp() {
InfoboxBuilderPage builderPage = new InfoboxBuilderPage().openNew("InfoboxBuilderDeletingDefaultComponents");
int rowComponents = builderPage.countRows();
int titleComponents = builderPage.countTitles();
int imageComponents = builderPage.countImages();
Assertion.assertEquals(rowComponents - 1, builderPage.deleteRowUsingPopUp(0).countRows());
Assertion.assertEquals(titleComponents - 1, builderPage.deleteTitleUsingPopUp(0).countTitles());
Assertion.assertEquals(imageComponents - 1, builderPage.deleteImageUsingPopUp(0).countImages());
}
Aggregations