mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
chore: adds more e2e tests (#2266)
This commit is contained in:
@@ -36,6 +36,29 @@ services:
|
|||||||
- 7070:8080
|
- 7070:8080
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
remote:
|
||||||
|
container_name: remote
|
||||||
|
environment:
|
||||||
|
- DOZZLE_REMOTE_HOST=tcp://proxy:2375
|
||||||
|
- DOZZLE_FILTER=name=dozzle
|
||||||
|
- DOZZLE_NO_ANALYTICS=1
|
||||||
|
ports:
|
||||||
|
- 5050:8080
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
depends_on:
|
||||||
|
- proxy
|
||||||
|
|
||||||
|
proxy:
|
||||||
|
container_name: proxy
|
||||||
|
image: tecnativa/docker-socket-proxy
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
environment:
|
||||||
|
- CONTAINERS=1
|
||||||
|
ports:
|
||||||
|
- 2375:2375
|
||||||
|
|
||||||
playwright:
|
playwright:
|
||||||
container_name: playwright
|
container_name: playwright
|
||||||
image: mcr.microsoft.com/playwright:v1.35.1-jammy
|
image: mcr.microsoft.com/playwright:v1.35.1-jammy
|
||||||
@@ -50,3 +73,4 @@ services:
|
|||||||
- dozzle
|
- dozzle
|
||||||
- custom_base
|
- custom_base
|
||||||
- auth
|
- auth
|
||||||
|
- remote
|
||||||
|
|||||||
15
e2e/remote.spec.ts
Normal file
15
e2e/remote.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { test, expect } from "@playwright/test";
|
||||||
|
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await page.goto("http://remote:8080/");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("has right title", async ({ page }) => {
|
||||||
|
await expect(page).toHaveTitle(/.* - Dozzle/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("select running container", async ({ page }) => {
|
||||||
|
await page.locator("ul.menu-list").getByRole("link", { name: "dozzle" }).click();
|
||||||
|
await expect(page).toHaveURL(/\/container/);
|
||||||
|
await expect(page.getByText("Accepting connections")).toBeVisible();
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user