neon-sprawl/bruno/neon-sprawl-server/faction-standing/Get faction standing after ...

35 lines
1.1 KiB
Plaintext

meta {
name: GET faction standing after operator chain
type: http
seq: 4
}
docs {
NEO-139: complete operator chain via HTTP quest flow (+15 Grid Operators rep), then read standing snapshot.
Pre-request runs operator-chain-quest-flow-helper (same organic path as NEO-138 grid contract accept Bruno).
See also quest-progress/Accept grid contract after operator chain.bru (seq 11).
}
script:pre-request {
const { completeOperatorChainQuestFlow } = require("../scripts/operator-chain-quest-flow-helper");
await completeOperatorChainQuestFlow(bru);
}
get {
url: {{baseUrl}}/game/players/{{playerId}}/faction-standing
body: none
auth: none
}
tests {
test("returns Grid Operators standing 15 after operator chain completion rep grant", function () {
expect(res.getStatus()).to.equal(200);
const body = res.getBody();
expect(body.schemaVersion).to.equal(1);
expect(body.factions).to.be.an("array");
const byId = Object.fromEntries(body.factions.map((row) => [row.id, row.standing]));
expect(byId["prototype_faction_grid_operators"]).to.equal(15);
expect(byId["prototype_faction_rust_collective"]).to.equal(0);
});
}