summaryrefslogtreecommitdiff
path: root/src/integrationTest
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2024-05-08 13:08:15 +0200
committerPaul-Christian Volkmer2024-05-08 13:08:15 +0200
commit86bee9e2cf5c97d1339d2cde59b3361e88973a7d (patch)
tree076992bcba2d74347f7020780ec0d53b63b416af /src/integrationTest
parentf419acb924b30ff73d672475c6f726c8c6e92c3b (diff)
feat: show info if no requests present
Diffstat (limited to 'src/integrationTest')
-rw-r--r--src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt25
1 files changed, 10 insertions, 15 deletions
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<HtmlPage>("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<HtmlPage>("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<HtmlPage>("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<HtmlPage>("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<Pageable>())).thenReturn(Page.empty())
val page = webClient.getPage<HtmlPage>("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)
}
}