Search in sources :

Example 1 with PivotTableEditor

use of org.activityinfo.test.pageobject.web.reports.PivotTableEditor 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 PivotTableEditor

use of org.activityinfo.test.pageobject.web.reports.PivotTableEditor 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 3 with PivotTableEditor

use of org.activityinfo.test.pageobject.web.reports.PivotTableEditor in project activityinfo by bedatadriven.

the class UiApplicationDriver method pivotTable.

@Override
public DataTable pivotTable(List<String> measures, List<String> rowDimensions) {
    ensureLoggedIn();
    PivotTableEditor pivotTable = applicationPage.navigateToReportsTab().createPivotTable();
    currentPage = pivotTable;
    for (String measure : measures) {
        pivotTable.selectMeasure(aliasTable.getAlias(measure));
    }
    pivotTable.selectDimensions(deAliasDimension(rowDimensions), Collections.<String>emptyList());
    return pivotTable.extractData();
}
Also used : PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor)

Example 4 with PivotTableEditor

use of org.activityinfo.test.pageobject.web.reports.PivotTableEditor in project activityinfo by bedatadriven.

the class UiApplicationDriver method drillDown.

@Override
public DataTable drillDown(String cellValue) {
    Preconditions.checkState(currentPage instanceof PivotTableEditor, "No pivot results. Please pivot data first before using drill down.");
    PivotTableEditor pivotTable = (PivotTableEditor) currentPage;
    DrillDownDialog drillDown = pivotTable.drillDown(cellValue);
    DataTable dataTable = drillDown.table().waitUntilReloadedSilently().waitUntilAtLeastOneRowIsLoaded().extractData(false);
    drillDown.close();
    return dataTable;
}
Also used : DataTable(cucumber.api.DataTable) DrillDownDialog(org.activityinfo.test.pageobject.web.reports.DrillDownDialog) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor)

Example 5 with PivotTableEditor

use of org.activityinfo.test.pageobject.web.reports.PivotTableEditor 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)

Aggregations

PivotTableEditor (org.activityinfo.test.pageobject.web.reports.PivotTableEditor)6 When (cucumber.api.java.en.When)4 UiApplicationDriver (org.activityinfo.test.driver.UiApplicationDriver)4 DataTable (cucumber.api.DataTable)1 DrillDownDialog (org.activityinfo.test.pageobject.web.reports.DrillDownDialog)1