1
0
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:
Amir Raminfar
2023-06-20 15:36:33 -07:00
committed by GitHub
parent 50f3c0b7a4
commit 8b3ddcfca7
2 changed files with 39 additions and 0 deletions

View File

@@ -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
View 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();
});