|
1 | | -import { test as base, type Page } from "@playwright/test"; |
| 1 | +import { test as base, expect, type Page } from "@playwright/test"; |
2 | 2 |
|
3 | 3 | // Defines a custom fixture that extends the base test with auth state |
4 | 4 | type AuthFixtures = { |
@@ -287,3 +287,72 @@ test("Capture 07 labs page", async ({ authenticatedPage }, testInfo) => { |
287 | 287 | fullPage: false, |
288 | 288 | }); |
289 | 289 | }); |
| 290 | + |
| 291 | +test("Capture 08 onco", async ({ authenticatedPage }, testInfo) => { |
| 292 | + await authenticatedPage.goto("/module/oncology"); |
| 293 | + await authenticatedPage.waitForLoadState("networkidle"); |
| 294 | + |
| 295 | + await authenticatedPage.screenshot({ |
| 296 | + path: `./screenshots/${testInfo.project.name}/light/08_onco.png`, |
| 297 | + fullPage: false, |
| 298 | + }); |
| 299 | + |
| 300 | + await expect(authenticatedPage.getByRole("button", { name: "Diagnose" })).toBeVisible(); |
| 301 | + await authenticatedPage.getByRole("button", { name: "Diagnose" }).click(); |
| 302 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-in |
| 303 | + |
| 304 | + await authenticatedPage.screenshot({ |
| 305 | + path: `./screenshots/${testInfo.project.name}/light/08.1_onco_diagnose.png`, |
| 306 | + fullPage: false, |
| 307 | + }); |
| 308 | + |
| 309 | + await authenticatedPage.locator("[data-dialog-close]").click(); |
| 310 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-out |
| 311 | + |
| 312 | + await expect(authenticatedPage.getByRole("button", { name: "Operation" })).toBeVisible(); |
| 313 | + await authenticatedPage.getByRole("button", { name: "Operation" }).click(); |
| 314 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-in |
| 315 | + |
| 316 | + await authenticatedPage.screenshot({ |
| 317 | + path: `./screenshots/${testInfo.project.name}/light/08.2_onco_operation.png`, |
| 318 | + fullPage: false, |
| 319 | + }); |
| 320 | + |
| 321 | + await authenticatedPage.locator("[data-dialog-close]").click(); |
| 322 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-out |
| 323 | + |
| 324 | + await expect(authenticatedPage.getByRole("button", { name: "Strahlentherapie" })).toBeVisible(); |
| 325 | + await authenticatedPage.getByRole("button", { name: "Strahlentherapie" }).click(); |
| 326 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-in |
| 327 | + |
| 328 | + await authenticatedPage.screenshot({ |
| 329 | + path: `./screenshots/${testInfo.project.name}/light/08.3_onco_strahlentherapie.png`, |
| 330 | + fullPage: false, |
| 331 | + }); |
| 332 | + |
| 333 | + await authenticatedPage.locator("[data-dialog-close]").click(); |
| 334 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-out |
| 335 | + |
| 336 | + await expect( |
| 337 | + authenticatedPage.getByRole("button", { name: "Systemische Therapie" }) |
| 338 | + ).toBeVisible(); |
| 339 | + await authenticatedPage.getByRole("button", { name: "Systemische Therapie" }).click(); |
| 340 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-in |
| 341 | + |
| 342 | + await authenticatedPage.screenshot({ |
| 343 | + path: `./screenshots/${testInfo.project.name}/light/08.4_onco_systemische_therapie.png`, |
| 344 | + fullPage: false, |
| 345 | + }); |
| 346 | + |
| 347 | + await authenticatedPage.locator("[data-dialog-close]").click(); |
| 348 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-out |
| 349 | + |
| 350 | + await expect(authenticatedPage.getByRole("button", { name: "Verlauf" })).toBeVisible(); |
| 351 | + await authenticatedPage.getByRole("button", { name: "Verlauf" }).click(); |
| 352 | + await authenticatedPage.waitForTimeout(500); // Wait for fade-in |
| 353 | + |
| 354 | + await authenticatedPage.screenshot({ |
| 355 | + path: `./screenshots/${testInfo.project.name}/light/08.5_onco_verlauf.png`, |
| 356 | + fullPage: false, |
| 357 | + }); |
| 358 | +}); |
0 commit comments