use of org.dashbuilder.displayer.client.AbstractDisplayer in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testAlwaysShow7Days.
@Test
public void testAlwaysShow7Days() throws Exception {
AbstractDisplayer displayer = (AbstractDisplayer) presenter.getTopAuthorSelectorDisplayer();
displayer.filterUpdate(COLUMN_AUTHOR, // "user" selected
1);
DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 2);
// Bar chart must always show 7 bars, one per day of week
dataSet = presenter.getCommitsByDayOfWeekDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 7);
}
use of org.dashbuilder.displayer.client.AbstractDisplayer in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testSelectAuthorAndWeekOfDay.
@Test
public void testSelectAuthorAndWeekOfDay() throws Exception {
AbstractDisplayer displayer = (AbstractDisplayer) presenter.getTopAuthorSelectorDisplayer();
displayer.filterUpdate(COLUMN_AUTHOR, // "user" selected
1);
DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 2);
displayer = (AbstractDisplayer) presenter.getCommitsByDayOfWeekDisplayer();
displayer.filterUpdate(COLUMN_DATE, // "Tuesday" selected
2);
dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 1);
}
use of org.dashbuilder.displayer.client.AbstractDisplayer in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testSelectYear.
@Test
public void testSelectYear() throws Exception {
AbstractDisplayer displayer = (AbstractDisplayer) presenter.getCommitsByYearDisplayer();
displayer.filterUpdate(COLUMN_DATE, // "2019" selected
0);
DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 4);
}
use of org.dashbuilder.displayer.client.AbstractDisplayer in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testSelectWeekOfDay.
@Test
public void testSelectWeekOfDay() throws Exception {
AbstractDisplayer displayer = (AbstractDisplayer) presenter.getCommitsByDayOfWeekDisplayer();
displayer.filterUpdate(COLUMN_DATE, // "Tuesday" selected
2);
DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 2);
}
Aggregations