TSK-1758: fixed state and domain filter in Reporting REST API.
This commit is contained in:
parent
e3edb45d67
commit
fc3202f201
|
@ -308,9 +308,9 @@ public class TimeIntervalReportFilterParameter
|
||||||
@ConstructorProperties({
|
@ConstructorProperties({
|
||||||
"in-working-days",
|
"in-working-days",
|
||||||
"workbasket-id",
|
"workbasket-id",
|
||||||
"states",
|
"state",
|
||||||
"classification-category",
|
"classification-category",
|
||||||
"domains",
|
"domain",
|
||||||
"classification-id",
|
"classification-id",
|
||||||
"excluded-classification-id",
|
"excluded-classification-id",
|
||||||
"custom-1",
|
"custom-1",
|
||||||
|
|
|
@ -111,6 +111,30 @@ class MonitorControllerIntTest {
|
||||||
.containsExactly(new int[] {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0});
|
.containsExactly(new int[] {0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void should_ApplyStateFilterAndComputeReport_When_QueryingForAWorkbasketReport() {
|
||||||
|
String url =
|
||||||
|
restHelper.toUrl(RestEndpoints.URL_MONITOR_WORKBASKET_REPORT)
|
||||||
|
+ "?workbasket-id=WBI:100000000000000000000000000000000008"
|
||||||
|
+ "&state=READY"
|
||||||
|
+ "&state=CLAIMED";
|
||||||
|
HttpEntity<?> auth = new HttpEntity<>(RestHelper.generateHeadersForUser("monitor"));
|
||||||
|
|
||||||
|
ResponseEntity<ReportRepresentationModel> response =
|
||||||
|
TEMPLATE.exchange(
|
||||||
|
url,
|
||||||
|
HttpMethod.GET,
|
||||||
|
auth,
|
||||||
|
ParameterizedTypeReference.forType(ReportRepresentationModel.class));
|
||||||
|
|
||||||
|
ReportRepresentationModel report = response.getBody();
|
||||||
|
assertThat(report).isNotNull();
|
||||||
|
assertThat(report.getSumRow())
|
||||||
|
.extracting(RowRepresentationModel::getCells)
|
||||||
|
// expecting 4 tasks due tomorrow (RELATIVE_DATE(1))
|
||||||
|
.containsExactly(new int[] {0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0});
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void should_ComputeWorkbasketPriorityReport_When_QueryingForAWorkbasketPriorityReport() {
|
void should_ComputeWorkbasketPriorityReport_When_QueryingForAWorkbasketPriorityReport() {
|
||||||
String url =
|
String url =
|
||||||
|
|
Loading…
Reference in New Issue