import { expect, test } from "@playwright/test"; import { anmelden, keinQuerscrollen } from "./helfer"; test("Katalog: Distributionen und Profile sehen, Distribution ab- und wieder einschalten", async ({ page, }) => { await anmelden(page, "/katalog"); await expect(page.getByRole("heading", { name: "Katalog", level: 1 })).toBeVisible(); await expect(page.getByText("Debian 13 „Trixie“")).toBeVisible(); await expect(page.getByText("Docker CE")).toBeVisible(); await keinQuerscrollen(page); const schalter = page.getByRole("switch", { name: /Ubuntu 22\.04 LTS/ }); await expect(schalter).toHaveAttribute("aria-checked", "true"); await schalter.click(); await expect(schalter).toHaveAttribute("aria-checked", "false"); await page.reload(); await expect(page.getByRole("switch", { name: /Ubuntu 22\.04 LTS/ })).toHaveAttribute( "aria-checked", "false", ); await page.screenshot({ path: `test-results/katalog-${test.info().project.name}.png`, fullPage: true }); await page.getByRole("switch", { name: /Ubuntu 22\.04 LTS/ }).click(); await expect(page.getByRole("switch", { name: /Ubuntu 22\.04 LTS/ })).toHaveAttribute( "aria-checked", "true", ); });