Testing Pull RequestsΒΆ
Guide for testing pull requests, specifically for the Customizable Map Pool feature (PR #11, Issue #10).
PrerequisitesΒΆ
Before testing, ensure you have:
- Git installed
- Node.js 18+ (for local development) OR Docker & Docker Compose (for Docker setup)
- PostgreSQL (can be run via Docker)
- A GitHub account with access to the repository
Option 1: Local Development SetupΒΆ
Step 1: Clone and Checkout PR BranchΒΆ
# Clone the repository
git clone https://github.com/sivert-io/matchzy-auto-tournament.git
cd matchzy-auto-tournament
# Fetch the PR branch
git fetch origin pull/11/head:pr-11-customizable-map-pool
# Switch to the PR branch
git checkout pr-11-customizable-map-pool
Alternative: If you already have the repository cloned:
cd matchzy-auto-tournament
# Fetch latest changes
git fetch origin
# Checkout the PR branch
git checkout feature/10-feature-customizable-map-pool
Step 2: Install DependenciesΒΆ
Step 3: Start PostgreSQL DatabaseΒΆ
This will:
- Create a PostgreSQL container if it doesn't exist
- Start the container
- Use default credentials:
postgres/postgres
Manual PostgreSQL setup (if preferred):
docker run -d --name matchzy-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=matchzy_tournament \
-p 5432:5432 \
postgres:16-alpine
Step 4: Set Environment VariablesΒΆ
# Generate server token (or use simple values for testing)
SERVER_TOKEN=$(openssl rand -base64 12 | tr -d '=+/')
# Display tokens (save these!)
echo "Your SERVER_TOKEN (for CS2 servers): $SERVER_TOKEN"
# Export environment variables
export SERVER_TOKEN
export DB_HOST=localhost
export DB_PORT=5432
export DB_USER=postgres
export DB_PASSWORD=postgres
export DB_NAME=matchzy_tournament
Note: For quick testing, you can use simple values:
Step 5: Start Development ServerΒΆ
This will start:
- Backend API:
http://localhost:3000 - Frontend:
http://localhost:5173
Access the application at: http://localhost:5173 and sign in with Steam/SSO from the login page.
Steam login in local developmentΒΆ
When you use Login with Steam in local dev, Steam is redirected back to the API on port 3000,
and the API then redirects the browser to the frontend.
For Yarn dev (API on 3000, Vite on 5173), set a frontend base URL before starting yarn dev:
The Steam callback will then redirect to:
http://localhost:5173/player/<steamId>
Note: Docker stacks already run behind Caddy on a single port (typically
3069), so they do not needFRONTEND_BASE_URLβ the default redirect host works there.
Option 2: Docker Compose SetupΒΆ
Step 1: Clone and Checkout PR BranchΒΆ
# Clone the repository
git clone https://github.com/sivert-io/matchzy-auto-tournament.git
cd matchzy-auto-tournament
# Fetch and checkout the PR branch
git fetch origin pull/11/head:pr-11-customizable-map-pool
git checkout pr-11-customizable-map-pool
Step 2: Set Environment VariablesΒΆ
# Generate tokens
SERVER_TOKEN=$(openssl rand -base64 12 | tr -d '=+/' )
# Display tokens
echo "Your SERVER_TOKEN (for CS2 servers): $SERVER_TOKEN"
# Export them
export SERVER_TOKEN
# Optional: Override database defaults
export DB_USER=postgres
export DB_PASSWORD=postgres
export DB_NAME=matchzy_tournament
Quick testing option:
Step 3: Build and Start with Docker ComposeΒΆ
This will:
- Build the application from source
- Start PostgreSQL
- Start the MatchZy Tournament API
- Serve everything on port 3069
Access the application at: http://localhost:3069
Step 4: View Logs (Optional)ΒΆ
# View all logs
docker compose -f docker/docker-compose.local.yml logs -f
# View only API logs
docker compose -f docker/docker-compose.local.yml logs -f matchzy-tournament
Testing the Map Pool FeatureΒΆ
1. LoginΒΆ
- Navigate to
http://localhost:5173(local dev) orhttp://localhost:3069(Docker) - Click "Login" (top right)
- Click Sign in with Steam (or another configured SSO provider). The first Steam login will become an admin automatically.
2. Navigate to Maps PageΒΆ
- Click "Maps" in the sidebar navigation
- You should see two tabs: "Maps" and "Map Pools"
3. Test Maps TabΒΆ
Add a New Map:
- Click "Add Map" button
- Fill in:
- Map ID:
de_testmap(lowercase, numbers, underscores only) - Display Name:
Test Map - Optionally upload an image or click "Fetch from GitHub"
- Click "Create"
- Verify the map appears in the list
Edit a Map:
- Click on any map card
- Click "Edit" in the actions modal
- Change the display name
- Click "Update"
- Verify changes are saved
Delete a Map:
- Click on a map card
- Click "Delete" in the actions modal
- Confirm deletion
- Verify map is removed
4. Test Map Pools TabΒΆ
Create a Map Pool:
- Switch to "Map Pools" tab
- Click "Create Map Pool" button
- Fill in:
- Map Pool Name:
My Test Pool - Select maps from the autocomplete dropdown
- Click "Create"
- Verify the pool appears in the list
Edit a Map Pool:
- Click on a map pool card
- Click "Edit" in the actions modal
- Add or remove maps
- Click "Update"
- Verify changes are saved
Delete a Map Pool:
- Click on a map pool card
- Click "Delete" in the actions modal
- Confirm deletion
- Verify pool is removed
5. Test Tournament IntegrationΒΆ
Create a Tournament with Map Pool:
- Navigate to "Tournament" page
- Click "Create Tournament" or edit existing tournament
- Fill in tournament details
- In Step 3: Map Pool, you should see:
- Dropdown with "Active Duty" option
- Any custom pools you created
- "Custom" option
- Select "Active Duty" or a custom pool
- If selecting "Custom":
- Select maps from autocomplete
- Click "Save Map Pool" to create a new pool
- Complete tournament creation
- Verify map pool is saved with tournament
Test Map Pool Validation:
- Create a tournament with BO1, BO3, or BO5 format
- Select a map pool with β 7 maps
- Verify warning message appears: "Map veto requires exactly 7 maps"
- Create a pool with exactly 7 maps
- Verify no warning appears
What to TestΒΆ
β Core FunctionalityΒΆ
- Can add new maps with Map ID and display name
- Can edit map display name and image
- Can delete maps
- Can create map pools with multiple maps
- Can edit map pools (add/remove maps)
- Can delete map pools
- Map pools appear in tournament creation dropdown
- Can select Active Duty pool in tournament
- Can select custom pools in tournament
- Can create custom selection during tournament creation
- Map pool validation works (7 maps required for veto formats)
β UI/UXΒΆ
- Maps page loads correctly
- Tabs switch between Maps and Map Pools
- Map cards display correctly (with/without images)
- Map pool cards show map count and preview chips
- Modals open and close correctly
- Form validation works (required fields, Map ID format)
- Error messages display correctly
- Success feedback appears after actions
β Edge CasesΒΆ
- Cannot create map with invalid Map ID format (uppercase, special chars)
- Cannot create map pool without selecting maps
- Cannot create map pool without name
- Warning appears when pool has β 7 maps for veto formats
- Can delete map that's in use (should handle gracefully)
- Can delete map pool that's in use (should handle gracefully)
Reporting IssuesΒΆ
If you find any bugs or issues while testing:
- Check existing issues: Search GitHub Issues to see if it's already reported
- Create new issue: If not found, create a new issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Browser/OS information
Issue Template:
## Bug Report
**Description:**
[Clear description of the issue]
**Steps to Reproduce:**
1. [Step 1]
2. [Step 2]
3. [Step 3]
**Expected Behavior:**
[What should happen]
**Actual Behavior:**
[What actually happens]
**Environment:**
- OS: [e.g., macOS 14.0]
- Browser: [e.g., Chrome 120]
- Setup: [Local Dev / Docker]
- Branch: `feature/10-feature-customizable-map-pool`
**Screenshots:**
[If applicable]
CleanupΒΆ
After testing, you can clean up:
Local Development:
# Stop development server (Ctrl+C)
# Stop PostgreSQL
yarn db:stop
# Or remove PostgreSQL container
yarn db:remove
Docker Compose:
# Stop and remove containers
docker compose -f docker/docker-compose.local.yml down
# Remove volumes (deletes database data)
docker compose -f docker/docker-compose.local.yml down -v
Switch back to main branch:
Additional ResourcesΒΆ
- Managing Maps Guide - Complete documentation for maps and map pools
- First Tournament Guide - Step-by-step tournament setup
- Troubleshooting Guide - Common issues and solutions
Questions?ΒΆ
If you have questions about testing or need help:
- Open a GitHub Discussion
- Comment on PR #11
- Check the documentation
Thank you for testing! π