1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

test: add e2e tests for simple auth mode (#2634)

This commit is contained in:
Amir Raminfar
2023-12-29 09:29:15 -08:00
committed by GitHub
parent feaf9c35d4
commit 45fa933f12
4 changed files with 24 additions and 1 deletions

4
e2e/data/users.yml Normal file
View File

@@ -0,0 +1,4 @@
users:
admin:
name: Admin
password: "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"

9
e2e/simple.spec.ts Normal file
View File

@@ -0,0 +1,9 @@
import { test, expect } from "@playwright/test";
test("simple authentication", async ({ page }) => {
await page.goto("http://simple-auth:8080/");
await page.locator('input[name="username"]').fill("admin");
await page.locator('input[name="password"]').fill("password");
await page.locator('button[type="submit"]').click();
await expect(page.getByTestId("containers")).toHaveText("Containers");
});