41 lines
1005 B
Plaintext
41 lines
1005 B
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.
|
|
}
|
|
|
|
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");
|
|
});
|
|
}
|