feat: TASK-001 - Playwright E2E test setup + baseline tests
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 33s

- Added @playwright/test as dev dependency
- Created playwright.config.ts with Chromium config and webServer setup
- Created e2e/combat.spec.ts (5 tests for spire mode, floor display)
- Created e2e/enchanting.spec.ts (4 tests for design/crafting tab, enchant flow)
- Created e2e/equipment.spec.ts (5 tests for equip, slots, 2H blocking)
- Created docs/tasks/TASK-001-playwright-setup.md
- All 13 E2E tests passing
This commit is contained in:
2026-05-11 13:25:57 +02:00
parent f6bf049f91
commit 47b2a0bdc7
8 changed files with 1746 additions and 11 deletions
+36
View File
@@ -14,6 +14,8 @@ Mana-Loop/
├── docs/
│ ├── strategy/
│ │ └── overall-remediation-plan.md
│ ├── tasks/
│ │ └── TASK-001-playwright-setup.md
│ ├── GAME_BRIEFING.md
│ ├── circular-deps.txt
│ ├── dependency-graph.json
@@ -21,12 +23,43 @@ Mana-Loop/
│ └── skills.md
├── download/
│ └── README.md
├── e2e/
│ ├── combat.spec.ts
│ ├── enchanting.spec.ts
│ └── equipment.spec.ts
├── examples/
│ └── websocket/
│ ├── frontend.tsx
│ └── server.ts
├── mini-services/
│ └── .gitkeep
├── playwright-report/
│ ├── data/
│ │ ├── 1513ea5b9ea5985996f67ca36f2bc4d34add51f1.webm
│ │ ├── 23eb0c541b68af33d962c3ac20ba74eb9ba477b3.md
│ │ ├── 25af666b2659e25b596f1eb58ca5629f38f0fa74.png
│ │ ├── 294ed85dfd5fbd79486f5274129a1d8b83cfa676.png
│ │ ├── 37c584c77b029af648d58a063f9724538662c6d0.webm
│ │ ├── 4d1229974e5326e2351c32921095bff6e989005e.png
│ │ ├── 4f22caa1a2b454f813b4c68c510a2ef0b340a248.md
│ │ ├── 6408809a17a0a92b06e5cc75fcee95e9778138c4.md
│ │ ├── 66a1f85e1e6a655dfb90f10bd1a60887cffa87da.md
│ │ ├── 6b97a6c84cfda4c717249f240d0a80e1b195498a.png
│ │ ├── 6c1c7d873c0c5262ffca286974649ec3bf1eb3f4.md
│ │ ├── 72280c2048aa77a6b58afc7bba8f9db3dfd1c68b.webm
│ │ ├── 8035d8abad1bfb2166374e25b55f52324fef1275.png
│ │ ├── 8396039272c615989307eaf4113a77b0d77cfbdd.webm
│ │ ├── a69b7491fd34ee0580bc0153a90dc146b509aac3.md
│ │ ├── bb3c9d51cafcb654c796b093c72c5b702f52faed.webm
│ │ ├── bee318a3f485bd3e98088a4735e02181585e431b.png
│ │ ├── c0f44af041cac0f5d5efaec8a9a9e5d165c8d26a.png
│ │ ├── cf49b56fde3bacf27d842ef4bfeed4887d97f01e.webm
│ │ ├── dbea283cbcf6aaed195161609c68ab7de0c6adfa.png
│ │ ├── dc2d9fe97c08dd61f42a27ead0829c2d74322ccc.webm
│ │ ├── e3d1abb209771785e7247c38fd372d8fd61b7ea4.md
│ │ ├── e59720b989841926cc856d6a00be0a6f8365cf49.webm
│ │ └── f5ba77f8b20c452bd2c31718b44897276882a465.md
│ └── index.html
├── prisma/
│ └── schema.prisma
├── public/
@@ -467,6 +500,8 @@ Mana-Loop/
│ │ └── upgrade-effects.types.ts
│ ├── db.ts
│ └── utils.ts
├── test-results/
│ └── .last-run.json
├── .accesslog
├── .dockerignore
├── .gitignore
@@ -488,6 +523,7 @@ Mana-Loop/
├── next.config.ts
├── package-lock.json
├── package.json
├── playwright.config.ts
├── postcss.config.mjs
├── tailwind.config.ts
├── tsconfig-check.json
+58
View File
@@ -0,0 +1,58 @@
# TASK-001: Playwright Setup + Baseline E2E Tests
## Objective
Add Playwright E2E testing to the Mana Loop project and create baseline tests that validate core gameplay systems work correctly. This establishes the test safety net required before any refactoring work begins.
## Acceptance Criteria
1. Playwright is installed and configured (`playwright.config.ts` exists)
2. `e2e/` directory exists with at least 3 passing test files
3. All baseline E2E tests pass (`npx playwright test` succeeds)
4. Tests cover: enchanting flow (3-step), equipment equipping (2H block), and combat progression
## Tasks
### Step 1: Install Playwright and create config
- Run `npx playwright install` and add `@playwright/test` to devDependencies
- Create `playwright.config.ts` with appropriate viewport, baseURL, and testDir settings
- Verify: `npx playwright --version` works
- Files: `package.json`, `playwright.config.ts`
### Step 2: Create baseline enchanting E2E test
- Create `e2e/enchanting.spec.ts` testing:
- Page loads and game initializes
- Player can navigate to Crafting tab
- Effect selection works (select an effect from unlocked pool)
- Design → Prepare → Apply flow completes
- File: `e2e/enchanting.spec.ts`
### Step 3: Create baseline equipment E2E test
- Create `e2e/equipment.spec.ts` testing:
- Player can equip items from inventory
- 2H weapon blocks offhand slot
- Unequipping returns item to inventory
- File: `e2e/equipment.spec.ts`
### Step 4: Create baseline combat E2E test
- Create `e2e/combat.spec.ts` testing:
- Player enters combat (clicks "Climb the Spire")
- Spell casting progresses over time
- Enemy HP decreases on spell completion
- Floor advances after clearing
- File: `e2e/combat.spec.ts`
### Step 5: Run tests and fix issues
- Run `npx playwright test` and ensure all tests pass
- Run `npx playwright test --headed` to visually verify if needed
- Fix any test flakes or timing issues
## Files to be touched
- `package.json` — add @playwright/test dependency
- `playwright.config.ts` — NEW file
- `e2e/enchanting.spec.ts` — NEW file
- `e2e/equipment.spec.ts` — NEW file
- `e2e/combat.spec.ts` — NEW file
## Dependencies
- None (first task in sequence)
## Time Estimate: ~2 hours