mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 22:39:18 +01:00
* chore(e2e): updates testing to use playwright * chore: updates workflows * fixes spaces * fixes space again * fixes int test to add docker * chore: ignore e2e tests for vite * updates screenshots for linux * updates screenshots again * chore: uses docker compose for e2e * adds PWTEST_SKIP_TEST_OUTPUT * add ci * updates screenshots again * updates with css * adds more tests * updates tests
33 lines
1017 B
TypeScript
33 lines
1017 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("http://dozzle:8080/");
|
|
});
|
|
|
|
test("has right title", async ({ page }) => {
|
|
await expect(page).toHaveTitle(/.* - Dozzle/);
|
|
});
|
|
|
|
test("click on settings button", async ({ page }) => {
|
|
await page.getByRole("link", { name: "Settings" }).click();
|
|
await expect(page.getByRole("heading", { name: "About" })).toBeVisible();
|
|
});
|
|
|
|
test("shortcut for fuzzy search", async ({ page }) => {
|
|
await page.locator("body").press("Control+k");
|
|
await expect(page.locator(".modal").getByPlaceholder("Search containers (⌘ + k, ⌃k)")).toBeVisible();
|
|
});
|
|
|
|
test("route by name", async ({ page }) => {
|
|
await page.goto("http://dozzle:8080/show?name=dozzle");
|
|
await expect(page).toHaveURL(/\/container/);
|
|
});
|
|
|
|
test.describe("es locale", () => {
|
|
test.use({ locale: "es" });
|
|
|
|
test("translated text", async ({ page }) => {
|
|
await expect(page.locator("p.menu-label").getByText("Contenedores")).toBeVisible();
|
|
});
|
|
});
|