use playwright image with deps, remove wizard health check
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
||||
ENV CHROME_DEBUGGING_PORT=9222
|
||||
FROM mcr.microsoft.com/playwright:v1.40.0-bookworm
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install && npm install -g playwright && playwright install chromium
|
||||
RUN npm install
|
||||
COPY . .
|
||||
ENV CHROME_DEBUGGING_PORT=9222
|
||||
CMD ["npx", "playwright", "test"]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
const WIZARD_URL = process.env.WIZARD_URL || 'http://127.0.0.1:18080';
|
||||
const BACKEND_URL = process.env.BACKEND_URL || 'http://127.0.0.1:8000';
|
||||
const FRONTEND_URL = process.env.FRONTEND_URL || 'http://frontend:3000';
|
||||
const BACKEND_URL = process.env.BACKEND_URL || 'http://backend:8000';
|
||||
|
||||
test.describe('Setup Wizard', () => {
|
||||
test('complete wizard flow', async ({ page }) => {
|
||||
// Go to frontend which should redirect to wizard
|
||||
await page.goto('/');
|
||||
await page.goto(FRONTEND_URL);
|
||||
|
||||
// Step 0: Welcome - Click "Connect to Wizard"
|
||||
await expect(page.locator('h1')).toContainText('HarborForge Setup Wizard');
|
||||
@@ -36,10 +36,4 @@ test.describe('Setup Wizard', () => {
|
||||
await expect(page.locator('h2')).toContainText('Setup complete!');
|
||||
await expect(page.locator('code')).toContainText('docker compose restart');
|
||||
});
|
||||
|
||||
test('wizard health check', async ({ request }) => {
|
||||
const response = await request.get(`${WIZARD_URL}/health`);
|
||||
// Wizard might return 200 or 404 if not initialized
|
||||
expect([200, 404]).toContain(response.status());
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user