Search in sources :

Example 1 with TablePage

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();
}
Also used : TablePage(org.activityinfo.test.pageobject.web.entry.TablePage) Given(cucumber.api.java.en.Given)

Example 2 with TablePage

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();
}
Also used : TablePage(org.activityinfo.test.pageobject.web.entry.TablePage) When(cucumber.api.java.en.When)

Example 3 with TablePage

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();
}
Also used : TablePage(org.activityinfo.test.pageobject.web.entry.TablePage) And(cucumber.api.java.en.And)

Example 4 with TablePage

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);
}
Also used : TablePage(org.activityinfo.test.pageobject.web.entry.TablePage) And(cucumber.api.java.en.And)

Example 5 with TablePage

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);
}
Also used : DesignPage(org.activityinfo.test.pageobject.web.design.DesignPage) TablePage(org.activityinfo.test.pageobject.web.entry.TablePage) DesignTab(org.activityinfo.test.pageobject.web.design.DesignTab)

Aggregations

TablePage (org.activityinfo.test.pageobject.web.entry.TablePage)7 And (cucumber.api.java.en.And)2 Given (cucumber.api.java.en.Given)1 Then (cucumber.api.java.en.Then)1 When (cucumber.api.java.en.When)1 DesignPage (org.activityinfo.test.pageobject.web.design.DesignPage)1 DesignTab (org.activityinfo.test.pageobject.web.design.DesignTab)1 Test (org.junit.Test)1