1
0
mirror of https://github.com/pcvolkmer/mv64e-etl-processor synced 2025-09-13 17:02:52 +00:00

feat: show info if no requests present

This commit is contained in:
2024-05-08 13:08:15 +02:00
parent f419acb924
commit 86bee9e2cf
3 changed files with 19 additions and 16 deletions

View File

@@ -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)
}
}