Search in sources :

Example 1 with UiApplicationDriver

use of org.activityinfo.test.driver.UiApplicationDriver in project activityinfo by bedatadriven.

the class AnalysisSteps method I_pin_the_report_to_my_dashboard.

@When("^I pin the report to my dashboard$")
public void I_pin_the_report_to_my_dashboard() throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    PivotTableEditor editor = (PivotTableEditor) ui.getCurrentPage();
    editor.reportBar().pinToDashboard();
}
Also used : UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor) When(cucumber.api.java.en.When)

Example 2 with UiApplicationDriver

use of org.activityinfo.test.driver.UiApplicationDriver in project activityinfo by bedatadriven.

the class AnalysisSteps method the_pivot_table_should_be_shown_on_my_dashboard_with.

@Then("^the pivot table \"([^\"]*)\" should be shown on my dashboard with:$")
public void the_pivot_table_should_be_shown_on_my_dashboard_with(String reportName, DataTable expectedData) throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    Dashboard dashboard = ui.getApplicationPage().navigateToDashboard();
    DashboardPortlet portlet = dashboard.findPortlet(aliasTable.getAlias(reportName));
    DataTable actual = portlet.extractPivotTableData();
    expectedData.diff(aliasTable.deAlias(actual));
}
Also used : DataTable(cucumber.api.DataTable) DashboardPortlet(org.activityinfo.test.pageobject.web.reports.DashboardPortlet) UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) Dashboard(org.activityinfo.test.pageobject.web.Dashboard) Then(cucumber.api.java.en.Then)

Example 3 with UiApplicationDriver

use of org.activityinfo.test.driver.UiApplicationDriver in project activityinfo by bedatadriven.

the class AnalysisSteps method I_share_the_report_with_users_of_the_database_as_a_default_dashboard_report.

@When("^I share the report with users of the \"([^\"]*)\" database as a default dashboard report$")
public void I_share_the_report_with_users_of_the_database_as_a_default_dashboard_report(String databaseName) throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    PivotTableEditor editor = (PivotTableEditor) ui.getCurrentPage();
    editor.reportBar().share().putOnDashboard(aliasTable.getAlias(databaseName)).ok();
}
Also used : UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor) When(cucumber.api.java.en.When)

Example 4 with UiApplicationDriver

use of org.activityinfo.test.driver.UiApplicationDriver in project activityinfo by bedatadriven.

the class AnalysisSteps method I_save_the_report_as.

@When("^I save the report as \"([^\"]*)\"$")
public void I_save_the_report_as(String reportName) throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    PivotTableEditor editor = (PivotTableEditor) ui.getCurrentPage();
    editor.reportBar().rename(aliasTable.createAlias(reportName));
    editor.reportBar().save();
    currentReport = reportName;
}
Also used : UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor) When(cucumber.api.java.en.When)

Example 5 with UiApplicationDriver

use of org.activityinfo.test.driver.UiApplicationDriver in project activityinfo by bedatadriven.

the class AnalysisSteps method I_share_the_report_with_users_of_the_database.

@When("^I share the report with users of the \"([^\"]*)\" database$")
public void I_share_the_report_with_users_of_the_database(String databaseName) throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    PivotTableEditor editor = (PivotTableEditor) ui.getCurrentPage();
    editor.reportBar().share().shareWith(aliasTable.getAlias(databaseName), true).ok();
}
Also used : UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor) When(cucumber.api.java.en.When)

Aggregations

UiApplicationDriver (org.activityinfo.test.driver.UiApplicationDriver)5 When (cucumber.api.java.en.When)4 PivotTableEditor (org.activityinfo.test.pageobject.web.reports.PivotTableEditor)4 DataTable (cucumber.api.DataTable)1 Then (cucumber.api.java.en.Then)1 Dashboard (org.activityinfo.test.pageobject.web.Dashboard)1 DashboardPortlet (org.activityinfo.test.pageobject.web.reports.DashboardPortlet)1