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:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,5 @@
|
|||||||
certs
|
certs
|
||||||
data
|
/data
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
.cache
|
.cache
|
||||||
|
|||||||
@@ -25,6 +25,16 @@ services:
|
|||||||
- 9090:8080
|
- 9090:8080
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
simple-auth:
|
||||||
|
container_name: simple-auth
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./e2e/data:/data
|
||||||
|
environment:
|
||||||
|
- DOZZLE_AUTH_PROVIDER=simple
|
||||||
|
- DOZZLE_NO_ANALYTICS=1
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
dozzle:
|
dozzle:
|
||||||
container_name: dozzle
|
container_name: dozzle
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
4
e2e/data/users.yml
Normal file
4
e2e/data/users.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
users:
|
||||||
|
admin:
|
||||||
|
name: Admin
|
||||||
|
password: "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
|
||||||
9
e2e/simple.spec.ts
Normal file
9
e2e/simple.spec.ts
Normal 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");
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user