Skip to content

Commit

Permalink
Adjust except timeouts for search related tests
Browse files Browse the repository at this point in the history
Remove these, once RISDEV-2269 is done.

Addresses RISDEV-0000
  • Loading branch information
zechmeister committed Sep 22, 2023
1 parent 88c812d commit c6955db
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions frontend/test/e2e/caselaw/search/documentunit-search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,22 @@ test.describe("search", () => {
.getByLabel("Dokumentnummer oder Aktenzeichen Suche")
.fill(documentNumber)
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()
//TODO: remove the timeout when search performance get better
await expect(
page.locator(".table-row", {
hasText: documentNumber,
}),
).toBeVisible({ timeout: 30000 })
).toBeVisible({ timeout: 30000 }) // RISDEV-2269

//no results
await page
.getByLabel("Dokumentnummer oder Aktenzeichen Suche")
.fill("wrong document number")
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()
//TODO: remove the timeout when search performance get better
await expect(
page.locator(".table-row", {
hasText: documentNumber,
}),
).toBeHidden({ timeout: 30000 })
).toBeHidden({ timeout: 30000 }) // RISDEV-2269

//error
await page.getByLabel("Nur meine Dokstelle Filter").click()
Expand All @@ -98,7 +96,7 @@ test.describe("search", () => {
})
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()

await expect(page.getByLabel("Infomodal")).toBeVisible()
await expect(page.getByLabel("Infomodal")).toBeVisible({ timeout: 30000 }) // RISDEV-2269
await expect(
page.getByText("Die Suchergebnisse konnten nicht geladen werden."),
).toBeVisible()
Expand Down Expand Up @@ -143,7 +141,7 @@ test.describe("search", () => {
)
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()

await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 })
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 }) // RISDEV-2269
expect(
await page
.locator(".table-row", {
Expand Down Expand Up @@ -172,7 +170,7 @@ test.describe("search", () => {
),
)
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 })
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 }) // RISDEV-2269

expect(
await page
Expand Down Expand Up @@ -217,7 +215,7 @@ test.describe("search", () => {
),
)
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 })
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 }) // RISDEV-2269

//TODO: add this line again when sorting by asc desc date in possible
// expect(
Expand Down Expand Up @@ -247,7 +245,7 @@ test.describe("search", () => {
)

await page.getByLabel("Nach Dokumentationseinheiten suchen").click()
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 })
await expect(page.getByLabel("Ladestatus")).toBeHidden({ timeout: 30000 }) // RISDEV-2269

expect(
await page
Expand Down Expand Up @@ -359,10 +357,9 @@ test.describe("search", () => {
.getByLabel("Nach Dokumentationseinheiten suchen")
.click()

//TODO: remove the timeout when search performance get better
await expect(pageWithBghUser.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269

expect(
await pageWithBghUser.getByText("unveröffentlicht").count(),
Expand All @@ -375,10 +372,9 @@ test.describe("search", () => {
.getByLabel("Nach Dokumentationseinheiten suchen")
.click()

//TODO: remove the timeout when search performance get better
await expect(pageWithBghUser.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269

expect(
await pageWithBghUser.getByText("veröffentlicht").count(),
Expand Down Expand Up @@ -407,10 +403,9 @@ test.describe("search", () => {
.getByLabel("Nach Dokumentationseinheiten suchen")
.click()

//TODO: remove the timeout when search performance get better
await expect(pageWithBghUser.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269

expect(
await pageWithBghUser.getByText("XXRE").count(),
Expand All @@ -423,27 +418,25 @@ test.describe("search", () => {
.getByLabel("Nach Dokumentationseinheiten suchen")
.click()

//TODO: remove the timeout when search performance get better
await expect(pageWithBghUser.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269
expect(
await pageWithBghUser.getByText("KORE").count(),
).toBeGreaterThanOrEqual(1)

await expect(pageWithBghUser.getByText("XXRE")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269

await errorsOnly.click()
await pageWithBghUser
.getByLabel("Nach Dokumentationseinheiten suchen")
.click()

//TODO: remove the timeout when search performance get better
await expect(pageWithBghUser.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269
expect(
await pageWithBghUser.getByText("Nicht veröffentlicht (Fehler)").count(),
).toBeGreaterThanOrEqual(1)
Expand All @@ -455,10 +448,9 @@ test.describe("search", () => {
.getByLabel("Nach Dokumentationseinheiten suchen")
.click()

//TODO: remove the timeout when search performance get better
await expect(pageWithBghUser.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269

expect(
await pageWithBghUser.getByText("unveröffentlicht").count(),
Expand All @@ -482,10 +474,9 @@ test.describe("search", () => {
await expect(resetSearch).toBeVisible()
await page.getByLabel("Nach Dokumentationseinheiten suchen").click()

//TODO: remove the timeout when search performance get better
await expect(page.getByLabel("Ladestatus")).toBeHidden({
timeout: 30000,
})
}) // RISDEV-2269
await expect(page.getByText("Keine Ergebnisse")).toBeVisible()
await resetSearch.click()
await expect(page.getByText("123")).toBeHidden()
Expand Down

0 comments on commit c6955db

Please sign in to comment.