Skip to content

Commit 4be3206

Browse files
committed
TST: New playwright screens for onco module.
1 parent ba328d3 commit 4be3206

1 file changed

Lines changed: 70 additions & 1 deletion

File tree

tests/screenshots/pages.spec.ts

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test as base, type Page } from "@playwright/test";
1+
import { test as base, expect, type Page } from "@playwright/test";
22

33
// Defines a custom fixture that extends the base test with auth state
44
type AuthFixtures = {
@@ -287,3 +287,72 @@ test("Capture 07 labs page", async ({ authenticatedPage }, testInfo) => {
287287
fullPage: false,
288288
});
289289
});
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

Comments
 (0)