From 4602032bcfc0ffad18d83555f2048229bc538b23 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Mon, 1 Sep 2025 13:33:29 +0200 Subject: [PATCH 1/2] chore: bump version --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 532eea1..934c512 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ plugins { } group = "dev.dnpm" -version = "0.11.0-SNAPSHOT" +version = "0.11.0" var versions = mapOf( "mtb-dto" to "0.1.0-SNAPSHOT", From 6dfec5c341862cdb5bbe8246937c9bfc8bd5a2f1 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 3 Sep 2025 21:18:28 +0200 Subject: [PATCH 2/2] fix: add status badge for 'NO_CONSENT' (#149) --- .../etl/processor/web/HomeControllerTest.kt | 24 +++++++++++++++++++ src/main/resources/templates/index.html | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt index 829f9a1..628112c 100644 --- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt +++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt @@ -282,6 +282,30 @@ class HomeControllerTest { assertThat(page.querySelectorAll("tbody tr")).isEmpty() assertThat(page.querySelectorAll("div.notification.info")).hasSize(1) } + + @Test + @WithMockUser(username = "admin", roles = ["ADMIN"]) + fun testShouldShowNoConsentStatusBadge() { + whenever(requestService.findRequestByPatientId(anyValueClass(), any())).thenReturn( + PageImpl( + listOf( + Request( + 1L, + randomRequestId(), + PatientPseudonym("PSEUDO1"), + PatientId("PATIENT1"), + Fingerprint("ashdkasdh"), + RequestType.MTB_FILE, + RequestStatus.NO_CONSENT + ) + ) + ) + ) + + val page = webClient.getPage("http://localhost/patient/PSEUDO1") + assertThat(page.querySelectorAll("tbody tr")).hasSize(1) + assertThat(page.querySelectorAll("tbody tr > td > small").first().textContent).isEqualTo("NO_CONSENT") + } } } diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 7ca0b67..f48e3dc 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -54,6 +54,7 @@ [[ ${request.status} ]] [[ ${request.status} ]] [[ ${request.status} ]] + [[ ${request.status} ]] [[ ${request.type} ]] [[ ${request.uuid} ]] @@ -100,4 +101,4 @@ }); - \ No newline at end of file +