use of org.activityinfo.test.pageobject.web.entry.TablePage in project activityinfo by bedatadriven.
the class DataEntrySteps method I_have_submitted_to_form_table_in_database.
@Given("^I have submitted to \"([^\"]*)\" form table in \"([^\"]*)\" database:$")
public void I_have_submitted_to_form_table_in_database(String formName, String database, DataTable dataTable) throws Throwable {
TablePage tablePage = driver.openFormTable(driver.getAliasTable().getAlias(database), driver.getAliasTable().getAlias(formName));
BsModal modal = tablePage.table().newSubmission();
modal.fill(dataTable, driver.getAliasTable());
modal.click(I18N.CONSTANTS.save()).waitUntilClosed();
}
use of org.activityinfo.test.pageobject.web.entry.TablePage in project activityinfo by bedatadriven.
the class DataEntrySteps method edit_entry_in_new_table_with_field_name_and_value_in_the_database_in_the_form_with.
@When("^edit entry in new table with field name \"([^\"]*)\" and value \"([^\"]*)\" in the database \"([^\"]*)\" in the form \"([^\"]*)\" with:$")
public void edit_entry_in_new_table_with_field_name_and_value_in_the_database_in_the_form_with(String fieldName, String fieldValue, String database, String formName, List<FieldValue> fieldValues) throws Throwable {
TablePage tablePage = openFormTable(database, formName);
// .waitUntilColumnShown(driver.getAliasTable().getAlias(fieldName));
tablePage.table().showAllColumns();
tablePage.table().waitForCellByText(fieldValue).getContainer().clickWhenReady();
BsModal bsModal = tablePage.table().editSubmission();
bsModal.fill(driver.getAliasTable().alias(fieldValues)).save();
}
use of org.activityinfo.test.pageobject.web.entry.TablePage in project activityinfo by bedatadriven.
the class DataEntrySteps method open_edit_dialog_for_entry_in_new_table_with_field_name_and_value.
@And("^open edit dialog for entry in new table with field value \"([^\"]*)\"$")
public void open_edit_dialog_for_entry_in_new_table_with_field_name_and_value(String fieldValue) throws Throwable {
TablePage tablePage = driver.tablePage();
// .waitUntilColumnShown(driver.getAliasTable().getAlias(fieldName));
tablePage.table().showAllColumns();
tablePage.table().waitForCellByText(fieldValue).getContainer().clickWhenReady();
tablePage.table().editSubmission();
}
use of org.activityinfo.test.pageobject.web.entry.TablePage in project activityinfo by bedatadriven.
the class DataEntrySteps method I_edit_first_row.
@And("^I edit first row$")
public void I_edit_first_row() throws Throwable {
TablePage tablePage = (TablePage) driver.getCurrentPage();
BsModal modal = tablePage.table().waitUntilAtLeastOneRowIsLoaded().selectFirstRow().editSubmission();
driver.setCurrentModal(modal);
}
use of org.activityinfo.test.pageobject.web.entry.TablePage in project activityinfo by bedatadriven.
the class ApplicationPage method navigateToTable.
public TablePage navigateToTable(String database, String formName) {
DesignTab designTab = navigateToDesignTab();
designTab.selectDatabase(database);
DesignPage designPage = designTab.design();
designPage.getDesignTree().select(formName);
designPage.getToolbarMenu().clickButton(I18N.CONSTANTS.openTable());
return new TablePage(page);
}
Aggregations