30 lines
779 B
Plaintext
30 lines
779 B
Plaintext
meta {
|
|
name: Get player combat health
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
script:pre-request {
|
|
const { resetPrototypeCombatTargets } = require("./scripts/combat-targets-reset-helper.js");
|
|
await resetPrototypeCombatTargets(bru);
|
|
}
|
|
|
|
get {
|
|
url: {{baseUrl}}/game/players/dev-local-1/combat-health
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
tests {
|
|
test("returns 200 JSON with schema v1 and full HP baseline", function () {
|
|
expect(res.getStatus()).to.equal(200);
|
|
expect(res.getHeader("content-type")).to.contain("application/json");
|
|
const body = res.getBody();
|
|
expect(body.schemaVersion).to.equal(1);
|
|
expect(body.playerId).to.equal("dev-local-1");
|
|
expect(body.maxHp).to.equal(100);
|
|
expect(body.currentHp).to.equal(100);
|
|
expect(body.defeated).to.equal(false);
|
|
});
|
|
}
|