Fix Issue #7: Add status message element and fix column resizing bug #8
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/issue-7-and-column-resize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR fixes two bugs:
Changes
1. Issue #7 - Status Message Element
<div id="status-message">toindex.htmlshowMessage()to apply type classes for visual feedbackFiles Changed:
index.html- Added status message divcss/main.css- Added.status-messagestyles and animationsjs/main.js- EnhancedshowMessage()to use type classes2. Column Resizing Bug
minmax(200px, 250px) minmax(600px, 3fr) minmax(200px, 250px)Files Changed:
css/main.css- Updated.game-containergrid-template-columnsTesting
Automated Tests
tests/ui/status-message.test.js- 10 test cases for status message functionalitytests/ui/column-resize.test.js- 8 test cases for layout stabilityTest Coverage:
Manual Testing Checklist
Before/After
Before (Issue #7)
After (Issue #7)
✅ Status messages display visually in the header with appropriate styling
✅ No console warnings
Before (Column Resize Bug)
After (Column Resize Bug)
✅ Columns maintain fixed minimum widths
✅ Stable layout throughout gameplay
✅ No visual shifting when content changes
Related Issues
Closes #7
Checklist
🤖 Generated with Claude Code
Add comprehensive Playwright integration for end-to-end UI testing with full CI/CD pipeline support. Changes: --------- 1. **Playwright Installation & Configuration** - Installed @playwright/test and http-server - Created playwright.config.js with optimized settings - Configured to use Chromium browser in headless mode - Auto-starts local web server on port 8080 for testing 2. **E2E Test Suite** Created tests/e2e/ directory with comprehensive tests: - **status-message.spec.js** (5 tests) ✓ Status message element exists in DOM ✓ Status message is hidden by default ✓ New game shows status message ✓ Status message has correct CSS classes - **layout-stability.spec.js** (5 tests) ✓ Chess board has fixed 600x600px dimensions ✓ Board squares are exactly 75px × 75px ✓ Column widths remain stable when pieces are captured ✓ Row heights remain stable when highlighting moves ✓ Last-move highlighting does not change layout 3. **Package.json Scripts** - test: Runs both unit and E2E tests - test:unit: Jest unit tests only - test:e2e: Playwright E2E tests - test:e2e:headed: Run with browser visible - test:e2e:ui: Interactive UI mode 4. **CI Pipeline Updates (.gitea/workflows/ci.yml)** - Split test job into test-unit and test-e2e - Added Playwright browser installation step - Configured artifact upload for Playwright reports - Updated job dependencies to include E2E tests Test Results: ------------- ✅ 9/9 Playwright E2E tests passing ✅ 124/124 Jest unit tests passing ✅ Total: 133 tests passing CI Configuration: ----------------- - Runs Playwright in CI mode (retries: 2, workers: 1) - Uses GitHub reporter for CI, list reporter for local - Captures screenshots on failure - Traces on first retry for debugging - Artifacts retained for 30 days Usage: ------ npm run test # All tests (unit + E2E) npm run test:unit # Jest unit tests only npm run test:e2e # Playwright E2E tests npm run test:e2e:ui # Interactive UI mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>Checkout
From your project repository, check out a new branch and test the changes.