37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
meta {
|
|
name: GET encounter progress inactive
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
docs {
|
|
NEO-108: fresh player row before engagement — inactive with empty defeatedTargetIds.
|
|
}
|
|
|
|
get {
|
|
url: {{baseUrl}}/game/players/{{playerId}}/encounter-progress
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
tests {
|
|
test("returns 200 JSON with schema v1", function () {
|
|
expect(res.getStatus()).to.equal(200);
|
|
const body = res.getBody();
|
|
expect(body.schemaVersion).to.equal(1);
|
|
expect(body.playerId).to.equal(bru.getEnvVar("playerId") || bru.getVar("playerId"));
|
|
expect(body.encounters).to.be.an("array");
|
|
expect(body.encounters.length).to.equal(1);
|
|
});
|
|
|
|
test("prototype_combat_pocket is inactive with no defeats", function () {
|
|
const body = res.getBody();
|
|
const row = body.encounters.find((x) => x.encounterId === "prototype_combat_pocket");
|
|
expect(row).to.be.an("object");
|
|
expect(row.state).to.equal("inactive");
|
|
expect(row.defeatedTargetIds).to.eql([]);
|
|
expect(row.completedAt).to.equal(undefined);
|
|
expect(row.rewardGrantSummary).to.equal(undefined);
|
|
});
|
|
}
|