45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
meta {
|
|
name: GET quest progress default
|
|
type: http
|
|
seq: 2
|
|
}
|
|
|
|
docs {
|
|
NEO-119: fresh dev-local-1 row before any quest accept — all four catalog quests not_started.
|
|
}
|
|
|
|
get {
|
|
url: {{baseUrl}}/game/players/{{playerId}}/quest-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.quests).to.be.an("array");
|
|
expect(body.quests.length).to.equal(4);
|
|
});
|
|
|
|
test("all prototype quests are not_started with empty counters", function () {
|
|
const body = res.getBody();
|
|
const expectedIds = [
|
|
"prototype_quest_combat_intro",
|
|
"prototype_quest_gather_intro",
|
|
"prototype_quest_operator_chain",
|
|
"prototype_quest_refine_intro",
|
|
];
|
|
const actualIds = body.quests.map((row) => row.questId);
|
|
expect(actualIds).to.eql(expectedIds);
|
|
for (const row of body.quests) {
|
|
expect(row.status).to.equal("not_started");
|
|
expect(row.currentStepIndex).to.equal(0);
|
|
expect(row.objectiveCounters).to.eql({});
|
|
expect(row.completedAt).to.equal(undefined);
|
|
}
|
|
});
|
|
}
|