feat: add web testing infrastructure
- Docker configurations for Playwright MCP (no host pollution) - Visual regression testing with pixelmatch - Link checking for 404/500 errors - Console error detection with Gitea issue creation - Form testing capabilities - /web-test and /web-test-fix commands - web-testing skill documentation - Reorganize project structure (docker/, scripts/, tests/) - Update orchestrator model to ollama-cloud/glm-5 Structure: - docker/ - Docker configurations (moved from archive) - scripts/ - Utility scripts - tests/ - Test suite with visual, console, links testing - .kilo/commands/ - /web-test and /web-test-fix commands - .kilo/skills/ - web-testing skill Issues: #58 #60 #62
This commit is contained in:
33
docker/Dockerfile.playwright
Normal file
33
docker/Dockerfile.playwright
Normal file
@@ -0,0 +1,33 @@
|
||||
# Playwright MCP Docker Image for E2E Testing
|
||||
# Based on official Microsoft Playwright image
|
||||
|
||||
FROM mcr.microsoft.com/playwright:v1.58.2-noble
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install -g @playwright/mcp@latest
|
||||
|
||||
# Create directories for tests
|
||||
RUN mkdir -p .test/screenshots/{baseline,current,diff} .test/reports
|
||||
|
||||
# Set environment variables
|
||||
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
||||
ENV PLAYWRIGHT_MCP_BROWSER=chromium
|
||||
# HEADLESS=false by default - browser is VISIBLE for observation
|
||||
# Set PLAYWRIGHT_MCP_HEADLESS=true for CI/CD
|
||||
ENV PLAYWRIGHT_MCP_HEADLESS=false
|
||||
|
||||
# Expose port for MCP server
|
||||
EXPOSE 8931
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8931/health || exit 1
|
||||
|
||||
# Default command - MCP server (HEADED by default - browser visible)
|
||||
# Browser window will be visible for observation
|
||||
CMD ["node", "/usr/local/lib/node_modules/@playwright/mcp/cli.js", \
|
||||
"--browser", "chromium", \
|
||||
"--no-sandbox", "--port", "8931", "--host", "0.0.0.0"]
|
||||
Reference in New Issue
Block a user