2.5 KiB
2.5 KiB
Manual QA — NEO-48 (perk state GET + branch selection POST)
Reference: implementation plan, NEO-47 plan (unlock engine).
Preconditions
- Run
NeonSprawl.Server(dotnet runfromserver/NeonSprawl.Server; defaulthttp://localhost:5253). - Dev player
dev-local-1exists in position state (default in-memory / seeded Postgres).
GET empty state
curl -sS "http://localhost:5253/game/players/dev-local-1/perk-state" | jq .
- HTTP 200;
schemaVersion1;branchPicks[];unlockedPerkIds[] (fresh server).
POST tier-1 pick (happy path)
- Grant salvage XP to reach level 2 (prototype curve: 100 total XP):
curl -sS -X POST "http://localhost:5253/game/players/dev-local-1/skill-progression" \
-H "Content-Type: application/json" \
-d '{"schemaVersion":1,"skillId":"salvage","amount":100,"sourceKind":"activity"}' | jq .
- Select tier-1 branch:
curl -sS -X POST "http://localhost:5253/game/players/dev-local-1/perk-state" \
-H "Content-Type: application/json" \
-d '{"schemaVersion":1,"skillId":"salvage","tierIndex":1,"branchId":"scrap_efficiency"}' | jq .
selected: true;perkState.branchPickscontains salvage tier 1scrap_efficiency;unlockedEventsempty at tier 1.- Repeat GET — same pick visible.
POST deny (mastery fixture reset)
Requires Game:EnableMasteryFixtureApi (on in Development) or Development environment.
# Reset dev-local-1 to salvage level 1, no perks
curl -sS -X POST "http://localhost:5253/game/players/dev-local-1/__dev/mastery-fixture" \
-H "Content-Type: application/json" \
-d '{"schemaVersion":1,"resetPerkState":true,"skillXp":{"salvage":0}}' | jq .
curl -sS -X POST "http://localhost:5253/game/players/dev-local-1/perk-state" \
-H "Content-Type: application/json" \
-d '{"schemaVersion":1,"skillId":"salvage","tierIndex":1,"branchId":"scrap_efficiency"}' | jq .
# expect level_too_low
- Fixture reset + branch POST →
level_too_low. - Fixture reset with
skillXp.salvage: 100, pickscrap_efficiency, POSTbulk_haul→branch_already_chosen.
Bruno
- Run folder
bruno/neon-sprawl-server/perk-state/(GET + POST happy + deny smoke). - Run
Post branch select deny branch already chosen(self-contained; pre-request grant + first pick).
Regression
cd server && dotnet test NeonSprawl.sln
Expect all tests pass including PerkStateApiTests.