Search in sources :

Example 11 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testSelectRepo.

@Test
public void testSelectRepo() throws Exception {
    // "repo1" selected
    repositorySelectorDisplayer.filterUpdate(COLUMN_REPO, 1);
    DataSet dataSet = allCommitsDisplayer.getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 2);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 12 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testSelectOrgUnit.

@Test
public void testSelectOrgUnit() throws Exception {
    // "emptyOrg" selected
    organizationSelectorDisplayer.filterUpdate(COLUMN_ORG, 0);
    DataSet dataSet = allCommitsDisplayer.getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 1);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 13 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testCommitsEvolution.

@Test
public void testCommitsEvolution() {
    Displayer displayer = presenter.getCommitsEvolutionDisplayer();
    DataSet dataSet = displayer.getDataSetHandler().getLastDataSet();
    assertDataSetValues(dataSet, new String[][] { { "2019-01", "1.00" }, { "2019-02", "0.00" }, { "2019-03", "1.00" }, { "2019-04", "1.00" }, { "2019-05", "0.00" }, { "2019-06", "1.00" }, { "2019-07", "1.00" }, { "2019-08", "0.00" }, { "2019-09", "1.00" }, { "2019-10", "0.00" }, { "2019-11", "1.00" }, { "2019-12", "0.00" }, { "2020-01", "0.00" }, { "2020-02", "1.00" } }, 0);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) SelectorDisplayer(org.dashbuilder.renderer.client.selector.SelectorDisplayer) AbstractDisplayer(org.dashbuilder.displayer.client.AbstractDisplayer) Displayer(org.dashbuilder.displayer.client.Displayer) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 14 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testSelectWeekOfDay.

@Test
public void testSelectWeekOfDay() throws Exception {
    // "Tuesday" selected
    dayOfWeekSelectorDisplayer.filterUpdate(COLUMN_DATE, 2);
    DataSet dataSet = allCommitsDisplayer.getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 2);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 15 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testClickOnOrgUnit.

@Test
public void testClickOnOrgUnit() throws Exception {
    // "org1" selected
    commitsPerOrganization.filterUpdate(COLUMN_ORG, 0);
    DataSet dataSet = allCommitsDisplayer.getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 4);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Aggregations

DataSet (org.dashbuilder.dataset.DataSet)41 Test (org.junit.Test)27 AbstractDisplayerTest (org.dashbuilder.displayer.client.AbstractDisplayerTest)25 AbstractDisplayer (org.dashbuilder.displayer.client.AbstractDisplayer)17 Displayer (org.dashbuilder.displayer.client.Displayer)13 ArrayList (java.util.ArrayList)12 RawDataSet (org.dashbuilder.dataset.RawDataSet)11 HashMap (java.util.HashMap)6 SelectorDisplayer (org.dashbuilder.renderer.client.selector.SelectorDisplayer)6 DataColumn (org.dashbuilder.dataset.DataColumn)3 DataSetLookup (org.dashbuilder.dataset.DataSetLookup)2 ProcessInstanceWithVarsDesc (org.jbpm.services.api.model.ProcessInstanceWithVarsDesc)2 UserTaskInstanceWithPotOwnerDesc (org.jbpm.services.api.model.UserTaskInstanceWithPotOwnerDesc)2 UserTaskInstanceWithVarsDesc (org.jbpm.services.api.model.UserTaskInstanceWithVarsDesc)2 Date (java.util.Date)1 List (java.util.List)1 DataSetBuilder (org.dashbuilder.dataset.DataSetBuilder)1 DataSetMetadata (org.dashbuilder.dataset.DataSetMetadata)1 DataColumnDef (org.dashbuilder.dataset.def.DataColumnDef)1 DataSetDef (org.dashbuilder.dataset.def.DataSetDef)1