Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
112 lines
3.0 KiB
Markdown
112 lines
3.0 KiB
Markdown
# Playwright E2E Testing Setup
|
|
|
|
## MinIO Test Instance
|
|
|
|
The Playwright tests use a **separate MinIO instance** to avoid interfering with your development/production MinIO instances.
|
|
|
|
### Configuration
|
|
|
|
- **Test MinIO Port**: `9002` (API) and `9003` (Console)
|
|
- **Your Payload MinIO Port**: `9000` (not touched by tests)
|
|
- **Test Bucket**: `alga-test`
|
|
- **Credentials**: `minioadmin` / `minioadmin`
|
|
|
|
### Automatic Setup
|
|
|
|
When you run Playwright tests, the setup happens automatically:
|
|
|
|
```bash
|
|
npm run test:playwright
|
|
```
|
|
|
|
This will:
|
|
1. Start a temporary MinIO container on port 9002
|
|
2. Create the `alga-test` bucket
|
|
3. Run all tests
|
|
4. Stop and remove the MinIO container (including data)
|
|
|
|
### Manual Control
|
|
|
|
If you need to manually manage the test MinIO:
|
|
|
|
```bash
|
|
# Start test MinIO
|
|
docker compose -f docker-compose.playwright.yml up -d
|
|
|
|
# Stop and cleanup test MinIO
|
|
docker compose -f docker-compose.playwright.yml down -v
|
|
|
|
# Restart test MinIO
|
|
docker compose -f docker-compose.playwright.yml down -v && docker compose -f docker-compose.playwright.yml up -d
|
|
|
|
# View logs
|
|
docker logs -f alga-psa-minio-test
|
|
```
|
|
|
|
### Architecture
|
|
|
|
```
|
|
┌─────────────────────────────────────────┐
|
|
│ Your Development Environment │
|
|
├─────────────────────────────────────────┤
|
|
│ │
|
|
│ Payload MinIO (Port 9000) │
|
|
│ ├─ Your production data │
|
|
│ └─ Never touched by tests │
|
|
│ │
|
|
│ Test MinIO (Port 9002) │
|
|
│ ├─ Temporary container │
|
|
│ ├─ Started before tests │
|
|
│ ├─ Destroyed after tests │
|
|
│ └─ Completely isolated │
|
|
│ │
|
|
└─────────────────────────────────────────┘
|
|
```
|
|
|
|
## Running Tests
|
|
|
|
### Run all tests
|
|
```bash
|
|
npm run test:playwright
|
|
```
|
|
|
|
### Run specific test file
|
|
```bash
|
|
npm run test:playwright -- document-upload-preview.playwright.test.ts
|
|
```
|
|
|
|
### Run with browser visible (headed mode)
|
|
```bash
|
|
DEBUG_BROWSER=true npm run test:playwright
|
|
```
|
|
|
|
### Run specific test
|
|
```bash
|
|
npm run test:playwright -- document-upload-preview.playwright.test.ts --grep "uploads a PNG"
|
|
```
|
|
|
|
## Test Files
|
|
|
|
- `document-upload-preview.playwright.test.ts` - Tests file uploads to MinIO with preview generation
|
|
- `document-permissions.playwright.test.ts` - Tests permission-based access control
|
|
|
|
## Troubleshooting
|
|
|
|
### MinIO container won't start
|
|
|
|
Check if port 9002 is already in use:
|
|
```bash
|
|
lsof -i :9002
|
|
```
|
|
|
|
### Clean up stuck containers
|
|
|
|
```bash
|
|
./scripts/minio-test.sh stop
|
|
docker ps | grep minio-test
|
|
```
|
|
|
|
### View MinIO console
|
|
|
|
Open http://localhost:9003 in your browser while tests are running.
|