# Complete application test plan - v1.5.0 Use this plan before a workshop and after every bigger package. ## 1. Smoke test ```text 1. Run: php -S localhost:8080 2. Open /index.html 3. Open /admin/login.html 4. Login as admin / admin-change-me 5. Open /join.html 6. Open /facilitator.html?code=FIRMA-742 7. Open /projector.html?code=FIRMA-742 ``` Expected: ```text - no blank pages - no visible JavaScript errors - admin login works - player view loads - facilitator view loads - projector view loads ``` ## 2. Asset workflow test ```text 1. Open /admin/tools/asset-library.html 2. Click Odswiez raport assetow 3. Click Odswiez assets/vendor 4. Open /admin/tools/animation-builder.html 5. Select a tileset 6. Click a few frames 7. Create animation running 8. Save to sprite-mapping.json 9. Return to Asset Library 10. Verify there are no critical errors for new spriteId ``` Expected: ```text - vendor index refresh works - sprite-mapping backup is created before save - new sprite appears in Asset Library - empty animation is not accepted ``` ## 3. Map and multi-map test Use scenario: ```text data/scenarios/system-polish-test-01.json ``` Maps: ```text polish-campus-hub-v01 polish-office-v01 polish-production-v01 polish-server-room-v01 polish-warehouse-v01 ``` Steps: ```text 1. Start player game 2. Walk around campus 3. Enter office 4. Return to campus 5. Enter production 6. Enter server room from production 7. Return to production 8. Enter warehouse ``` Expected: ```text - transitions move player to target map - player appears at correct spawn - no crash on map load - movement logs contain map_id / map_path ``` ## 4. Player clean view Open: ```text /index.html ``` Expected: ```text - no raw technical debug data - no X/Y position box - no validator section - no asset tools - player sees scenario, map, indicators, economy, quests, journal ``` Open: ```text /index.html?debug=1 ``` Expected: ```text - technical sections are visible - debug toggles work ``` ## 5. Facilitator test ```text 1. Join as Team A 2. Join as Team B in another window/incognito 3. Open facilitator with FIRMA-742 4. Select all teams 5. Send message 6. Select only Team A 7. Send event 8. Add cash to all teams 9. Change cyber only for Team B 10. Check intervention history ``` Expected: ```text - selected targets are clear - player receives only targeted messages/events - cash and indicators change correctly - intervention history records actions ``` ## 6. Projector test ```text 1. Open /projector.html?code=FIRMA-742 2. Change team state through player/facilitator 3. Refresh projector 4. Test fullscreen button if available ``` Expected: ```text - projector is readable - KPI and team status update - no technical clutter ``` ## 7. Report and debriefing test ```text 1. Create some movement and actions 2. Send facilitator interventions 3. Open /session-summary.html 4. Open /debrief.html ``` Expected: ```text - teams are compared clearly - facilitator interventions are listed - debriefing gives useful workshop prompts ``` ## 8. Analytics test ```text 1. Move players through several maps 2. Open /admin/tools/workshop-analytics.html 3. Load session code FIRMA-742 4. Select maps 5. Toggle spaghetti and heatmap 6. Export CSV ``` Expected: ```text - MOVE_TILE count is visible - selected map has heatmap if player moved there - spaghetti does not draw a single stupid line between maps - NPC movement does not pollute player spaghetti unless explicitly shown ``` ## 9. QA and workshop check ```text 1. Open /admin/tools/playtest-qa.html 2. Open /admin/workshop-check.html 3. Check system polish scenario ``` Expected: ```text - mapFile exists - transitions are valid enough for testing - scenario has briefing and objectives - backend status is OK ``` ## 10. Pass criteria for workshop Before real workshop: ```text - player can join - facilitator can control teams - projector is readable - scenario can be played for at least 10 minutes without crash - report opens - debriefing opens - analytics opens - asset library has no critical red errors for maps used in workshop - PROJECT_HANDOFF.md is updated ``` # v1.5.0 additional tests - Scenario Flow Engine ## Scenario Timeline 1. Open `/admin/tools/scenario-timeline.html`. 2. Select `SCN_SYSTEM_POLISH_TEST_01`. 3. Confirm stages are listed. 4. Confirm recurring event is listed. 5. Confirm availability windows are listed. 6. Confirm validation has no critical stage ID errors. ## Recurring event test 1. Start game with system polish test scenario. 2. Start session. 3. Let game run until crisis stage. 4. Confirm `EVT_RECURRING_CLIENT_PRESSURE` appears. 5. Resolve it. 6. Wait for the next interval. 7. Confirm it does not exceed maxRuns. ## Availability window test 1. Find purchase/role with `availability`. 2. Before its stage, confirm it is locked or unavailable. 3. After entering the correct stage, confirm it becomes available. 4. After `untilStage`, confirm it is locked again. ## Map Builder map selector test 1. Open `/admin/tools/map-builder.html`. 2. Use map selector. 3. Load `polish-office-v01.json`. 4. Load `polish-production-v01.json`. 5. Confirm fields update. 6. Confirm clicking canvas selects correct tile. ## Animation Builder click test 1. Open `/admin/tools/animation-builder.html`. 2. Select any visible tileset. 3. Set frame size. 4. Click a known grid cell. 5. Confirm selected frame number matches the clicked cell. 6. Repeat near edges and after browser zoom change. ## Testy v1.5.1 - Scenario Flow Control Room - Otworz panel prowadzacego i sprawdz sekcje Scenario Director. - Wybierz odbiorcow: wszyscy, wybrane druzyny, jedna druzyna. - Ustaw etap tylko jednej druzynie i sprawdz, czy inna druzyna nie zmienila etapu. - Kliknij Zatrzymaj auto-etapy i sprawdz zapis stanu. - Kliknij Wznow auto-etapy i sprawdz zapis stanu. - Odpal recurring event z przycisku Odpal teraz. - W Control Room sprawdz, dlaczego eventy sa zablokowane. --- # v1.5.3 regression tests ## Map Studio multifloor demo - Load all `demo-*` maps in Map Studio. - Test every transition by double click. - Test target loading after double click. - Test stairs up/down. - Test elevator up/down. - Test one-way delivery gate from yard to warehouse. - Test transition hover text edit and save. - Test map network panel. ## Entry-trigger events - Start `SCN_MAP_STUDIO_MULTIFLOOR_DEMO_01`. - Enter office reception and confirm event. - Enter server room and confirm event. - Enter production hall and confirm event. - Enter warehouse area and confirm event. - Confirm event does not repeat when staying in same room unless repeatable is true. - Confirm event respects stage rules if stageId is set. ## Analytics after multifloor test - Move across at least 3 maps. - Open Workshop Analytics. - Confirm logs are split by map. - Confirm spaghetti does not draw one line across unrelated maps. - Confirm map transition network has demo maps. --- # v1.5.5 additional tests - multitile animation frames ## Animation Builder multitile tests 1. Open `/admin/tools/animation-builder.html`. 2. Rebuild/refresh `assets/vendor`. 3. Pick a tileset. 4. Set base tile size to 16x16. 5. Set frame size to 2x2. 6. Confirm the blue frame grid is larger than the small base grid. 7. Click a frame. 8. Confirm yellow selection covers the full 2x2 rectangle. 9. Add at least three frames to `walkDown`. 10. Save animation to project. 11. Confirm JSON contains `baseTileWidth`, `baseTileHeight`, `frameTileW`, `frameTileH`, `anchor`, `footprint`. ## Animation Preview multitile tests 1. Open `/admin/tools/animation-preview.html`. 2. Select the new sprite. 3. Select the new animation. 4. Confirm the preview renders the full frame, not a single tile. ## Game renderer tests 1. Use the new 2x2 sprite as an NPC. 2. Set footprint 1x1. 3. Confirm NPC is visually larger but blocks only one tile. 4. Use a 4x2 machine sprite. 5. Set footprint 4x2. 6. Confirm machine blocks all 4x2 tiles. ## Map Builder tests 1. Open Map Builder. 2. Place an object using a 4x2 sprite with footprint 4x2. 3. Confirm selection rectangle covers 4x2 tiles. 4. Confirm pathfinding preview treats the 4x2 object as blocked. 5. Place a tall 2x3 NPC with footprint 1x1. 6. Confirm selection/collision is 1x1 while graphic is taller. # System Diagnostics Center tests ## Basic test 1. Login as admin. 2. Open `/admin/tools/system-diagnostics.html`. 3. Click `Uruchom pelna diagnostyke`. 4. Confirm that global status is visible. 5. Confirm that KPI cards show critical/error/warning/info. 6. Confirm that categories are visible. 7. Filter by `warning`. 8. Filter by a text such as `sprite` or `map`. 9. Open issue details. 10. Confirm fix hints are visible. ## Export test 1. Run diagnostics. 2. Click `Pobierz raport JSON`. 3. Check that JSON contains `status`, `counts`, `stats`, `issues`. 4. Click `Pobierz raport MD`. 5. Check that Markdown contains issue list. 6. Click `Kopiuj skrot`. ## Workshop readiness test 1. Run diagnostics before workshop. 2. Fix all critical/error items. 3. Accept or document warning items. 4. Run Playtest QA. 5. Test player, facilitator and projector. 6. Run diagnostics again. ## Asset regression test 1. Add or remove a test sprite. 2. Run diagnostics. 3. Confirm missing/unused sprite warnings are visible. 4. Open Asset Library from quick links. ## Map regression test 1. Break a test transition targetSpawn. 2. Run diagnostics. 3. Confirm transition error appears. 4. Fix it in Map Studio. 5. Run diagnostics again.