use of com.wikia.webdriver.pageobjectsfactory.componentobject.addtable.TableBuilderComponentObject in project selenium-tests by Wikia.
the class ArticleFeaturesCRUDTestsUser method addingTable.
@Test(dataProviderClass = ArticleFeaturesCRUDDataProvider.class, dataProvider = "getTableProperties", groups = { "ArticleFeaturesCRUDUser_011" })
@Execute(asUser = User.USER)
public void addingTable(int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment) {
new ArticleContent().clear();
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
TableBuilderComponentObject addTable = visualEditMode.clickAddTableButton();
addTable.verifyAddTableLightbox();
addTable.typeAmountOfRows(3);
addTable.typeAmountOfColumns(2);
addTable.selectHeader(Headers.FIRSTCOLUMN);
addTable.typeBorderSize(border);
addTable.selectAlignment(alignment);
addTable.typeWidth(width);
addTable.typeHeight(height);
addTable.typeCellSpacing(cellspacing);
addTable.typeCellPadding(cellpadding);
addTable.submitTable();
ArticlePageObject article = visualEditMode.submitArticle();
article.verifyTableBorder(border);
article.verifyTableCellspacing(cellspacing);
article.verifyTableCellpadding(cellpadding);
article.verifyTableAlignment(alignment);
article.verifyTableSize(width, height);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.addtable.TableBuilderComponentObject in project selenium-tests by Wikia.
the class ArticleFeaturesCRUDTestsUser method modifyTable.
@Test(dataProviderClass = ArticleFeaturesCRUDDataProvider.class, dataProvider = "getTableProperties", groups = { "ArticleFeaturesCRUDUser_012" }, enabled = false)
@Execute(asUser = User.USER)
public void modifyTable(int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment) {
new ArticleContent().push(String.format("{| border=\"%d\" cellpadding=\"%d\" cellspacing=\"%d\" " + "class=\"article-table article-table-selected\" " + "style=\"float: %s; height: %dpx; width: %dpx;\"\n" + "! scope=\"row\"|\n|\n|-\n! scope=\"row\"|\n|\n" + "|-\n! scope=\"row\"|\n|\n" + "|}", border, cellpadding, cellspacing, alignment.getAlignment(), height, width));
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
visualEditMode.clickPropertiesTableButton();
TableBuilderComponentObject addTable = new TableBuilderComponentObject(driver);
addTable.typeBorderSize(border + additionalPropertyValue);
addTable.typeCellSpacing(cellspacing + additionalPropertyValue);
addTable.typeCellPadding(cellpadding + additionalPropertyValue);
addTable.submitTable();
ArticlePageObject article = visualEditMode.submitArticle();
article.verifyTableBorder(border + additionalPropertyValue);
article.verifyTableCellspacing(cellspacing + additionalPropertyValue);
article.verifyTableCellpadding(cellpadding + additionalPropertyValue);
}
Aggregations