Move Playwright, Docker, and package.json into examples/django-react-site
Root directory now contains only the two core packages (django/, react/), examples/, and top-level docs. All e2e/integration test infrastructure lives in examples/django-react-site/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
examples/django-react-site/Dockerfile.test
Normal file
21
examples/django-react-site/Dockerfile.test
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mizan from local source with channels support
|
||||
COPY django/ /app/django/
|
||||
RUN pip install --no-cache-dir /app/django[channels] daphne
|
||||
|
||||
# Copy example app
|
||||
COPY examples/django-react-site/backend/ /app/example/
|
||||
|
||||
WORKDIR /app/example
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["sh", "-c", "python manage.py migrate --run-syncdb && daphne -b 0.0.0.0 -p 8000 testapp.asgi:application"]
|
||||
17
examples/django-react-site/docker-compose.test.yml
Normal file
17
examples/django-react-site/docker-compose.test.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
django:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: examples/django-react-site/Dockerfile.test
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- DJANGO_SETTINGS_MODULE=testapp.settings
|
||||
18
examples/django-react-site/package.json
Normal file
18
examples/django-react-site/package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "mizan",
|
||||
"version": "1.0.0",
|
||||
"description": "Django + React server functions framework.",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"example": "example"
|
||||
},
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"type": "commonjs",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.58.2",
|
||||
"@types/node": "^25.5.0"
|
||||
}
|
||||
}
|
||||
14
examples/django-react-site/playwright.config.ts
Normal file
14
examples/django-react-site/playwright.config.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { defineConfig } from '@playwright/test'
|
||||
|
||||
export default defineConfig({
|
||||
testDir: '.',
|
||||
timeout: 15000,
|
||||
retries: 0,
|
||||
reporter: 'list',
|
||||
use: {
|
||||
baseURL: 'http://localhost:8000',
|
||||
},
|
||||
projects: [
|
||||
{ name: 'chromium', use: { browserName: 'chromium' } },
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user