From 86bee9e2cf5c97d1339d2cde59b3361e88973a7d Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 8 May 2024 13:08:15 +0200 Subject: feat: show info if no requests present --- .../dnpm/etl/processor/web/HomeControllerTest.kt | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src/integrationTest/kotlin') 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 c37236a..d227dcd 100644 --- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt +++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt @@ -140,9 +140,8 @@ class HomeControllerTest { ) val page = webClient.getPage("http://localhost/") - assertThat( - page.querySelectorAll("tbody tr") - ).hasSize(2) + assertThat(page.querySelectorAll("tbody tr")).hasSize(2) + assertThat(page.querySelectorAll("div.notification.info")).isEmpty() } @Test @@ -167,9 +166,8 @@ class HomeControllerTest { ) val page = webClient.getPage("http://localhost/report/${requestId}") - assertThat( - page.querySelectorAll("tbody tr") - ).hasSize(1) + assertThat(page.querySelectorAll("tbody tr")).hasSize(1) + assertThat(page.querySelectorAll("div.notification.info")).isEmpty() } @Test @@ -201,9 +199,8 @@ class HomeControllerTest { ) val page = webClient.getPage("http://localhost/patient/PSEUDO1") - assertThat( - page.querySelectorAll("tbody tr") - ).hasSize(2) + assertThat(page.querySelectorAll("tbody tr")).hasSize(2) + assertThat(page.querySelectorAll("div.notification.info")).isEmpty() } } @@ -225,9 +222,8 @@ class HomeControllerTest { @Test fun testShouldShowHomePage() { val page = webClient.getPage("http://localhost/") - assertThat( - page.querySelectorAll("tbody tr") - ).isEmpty() + assertThat(page.querySelectorAll("tbody tr")).isEmpty() + assertThat(page.querySelectorAll("div.notification.info")).hasSize(1) } @Test @@ -252,9 +248,8 @@ class HomeControllerTest { whenever(requestService.findRequestByPatientId(anyString(), any())).thenReturn(Page.empty()) val page = webClient.getPage("http://localhost/patient/PSEUDO1") - assertThat( - page.querySelectorAll("tbody tr") - ).hasSize(0) + assertThat(page.querySelectorAll("tbody tr")).isEmpty() + assertThat(page.querySelectorAll("div.notification.info")).hasSize(1) } } -- cgit v1.2.3