43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
meta {
|
|
name: POST skill progression grant
|
|
type: http
|
|
seq: 2
|
|
}
|
|
|
|
docs {
|
|
NEO-38: single skill XP grant + allowlist + level-up metadata; see server README.
|
|
NEO-40: same contract; server adds comment-only telemetry hook markers (no request/response change).
|
|
E2.M2 tracking row in docs/decomposition/modules/documentation_and_implementation_alignment.md lists NEO-40 landed with plan + manual QA links.
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/game/players/dev-local-1/skill-progression
|
|
body: json
|
|
auth: none
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"schemaVersion": 1,
|
|
"skillId": "salvage",
|
|
"amount": 10,
|
|
"sourceKind": "activity"
|
|
}
|
|
}
|
|
|
|
tests {
|
|
test("grant returns 200 with granted true and progression", function () {
|
|
expect(res.getStatus()).to.equal(200);
|
|
const body = res.getBody();
|
|
expect(body.schemaVersion).to.equal(1);
|
|
expect(body.granted).to.equal(true);
|
|
expect(body.progression).to.be.an("object");
|
|
expect(body.progression.schemaVersion).to.equal(1);
|
|
expect(body.progression.playerId).to.equal("dev-local-1");
|
|
expect(body.levelUps).to.be.an("array");
|
|
const salvage = body.progression.skills.find((x) => x.id === "salvage");
|
|
expect(salvage).to.be.an("object");
|
|
expect(salvage.xp).to.be.a("number");
|
|
});
|
|
}
|