QQQ-41: added app sections, new widgets, ability to have no tables under app, etc.

This commit is contained in:
Tim Chamberlain
2022-09-16 10:19:06 -05:00
parent 01afdaacfd
commit 8891b3e7ea
19 changed files with 1923 additions and 70 deletions

View File

@ -23,7 +23,7 @@ package com.kingsrook.sampleapp.dashboard.widgets;
import com.kingsrook.qqq.backend.core.exceptions.QException;
import com.kingsrook.qqq.backend.core.model.dashboard.widgets.BarChart;
import com.kingsrook.qqq.backend.core.model.dashboard.widgets.ChartData;
import com.kingsrook.qqq.backend.core.model.session.QSession;
import com.kingsrook.sampleapp.SampleMetaDataProvider;
import org.junit.jupiter.api.Test;
@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/*******************************************************************************
** Unit test for PersonsByCreateDateBarChart
*******************************************************************************/
class PersonsByCreateDateBarChartTest
class PersonsByCreateDateChartTestData
{
/*******************************************************************************
@ -45,11 +45,11 @@ class PersonsByCreateDateBarChartTest
void test() throws QException
{
Object widgetData = new PersonsByCreateDateBarChart().render(SampleMetaDataProvider.defineInstance(), new QSession(), null);
assertThat(widgetData).isInstanceOf(BarChart.class);
BarChart barChart = (BarChart) widgetData;
assertEquals("barChart", barChart.getType());
assertThat(barChart.getTitle()).isNotBlank();
assertNotNull(barChart.getBarChartData());
assertThat(widgetData).isInstanceOf(ChartData.class);
ChartData chartData = (ChartData) widgetData;
assertEquals("chartData", chartData.getType());
assertThat(chartData.getTitle()).isNotBlank();
assertNotNull(chartData.getChartData());
}
}