NEO-139: reset faction standing before default Bruno GET.
Seq 2 pre-request clears prototype faction rows so re-runs pass after operator-chain flows leave +15 standing.pull/179/head
parent
329028429d
commit
7347b3b3b3
|
|
@ -6,8 +6,12 @@ meta {
|
|||
|
||||
docs {
|
||||
NEO-139: per-player standing snapshot for all catalog factions.
|
||||
Fresh in-memory server (or reset standing) returns neutral 0 for both prototype factions.
|
||||
Postgres may retain prior standing until reset — restart server or clear player_faction_standing for dev-local-1.
|
||||
Pre-request clears prototype faction standing via POST …/__dev/quest-fixture resetFactionIds so re-runs stay neutral after seq 4 or quest-progress operator-chain flows.
|
||||
}
|
||||
|
||||
script:pre-request {
|
||||
const { resetPrototypeFactionStanding } = require("./scripts/bruno-dev-fixture-helper");
|
||||
await resetPrototypeFactionStanding(bru);
|
||||
}
|
||||
|
||||
get {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ meta {
|
|||
}
|
||||
|
||||
docs {
|
||||
Run seq 1–3 on a fresh dev player for neutral standing defaults.
|
||||
Seq 4 (operator chain) leaves Grid Operators standing at 15 — re-run seq 2 only after server restart or standing reset, or expect non-zero values.
|
||||
Run seq 2 self-resets faction standing before asserting neutral defaults.
|
||||
Seq 4 (operator chain) leaves Grid Operators standing at 15 — expected; re-run seq 2 anytime to verify reset + neutral read.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,25 @@ const ALL_PROTOTYPE_QUEST_IDS = [
|
|||
"prototype_quest_refine_intro",
|
||||
];
|
||||
|
||||
const PROTOTYPE_FACTION_IDS = [
|
||||
"prototype_faction_grid_operators",
|
||||
"prototype_faction_rust_collective",
|
||||
];
|
||||
|
||||
async function resetPrototypeFactionStanding(bru) {
|
||||
const { baseUrl, playerId, jsonHeaders } = resolveConfig(bru);
|
||||
const response = await axios.post(
|
||||
`${baseUrl}/game/players/${playerId}/__dev/quest-fixture`,
|
||||
{ schemaVersion: 1, resetFactionIds: PROTOTYPE_FACTION_IDS },
|
||||
jsonHeaders,
|
||||
);
|
||||
if (response.status !== 200 || response.data?.applied !== true) {
|
||||
throw new Error(
|
||||
`quest-fixture resetFactionIds failed: ${response.status} ${JSON.stringify(response.data)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async function assertAllPrototypeQuestsNotStarted(bru) {
|
||||
const { baseUrl, playerId } = resolveConfig(bru);
|
||||
const response = await axios.get(`${baseUrl}/game/players/${playerId}/quest-progress`, {
|
||||
|
|
@ -91,7 +110,9 @@ module.exports = {
|
|||
resetAllPrototypeQuestProgress,
|
||||
resetGatherIntroQuestProgress,
|
||||
resetGatherIntroSpine,
|
||||
resetPrototypeFactionStanding,
|
||||
clearInventory,
|
||||
assertAllPrototypeQuestsNotStarted,
|
||||
ALL_PROTOTYPE_QUEST_IDS,
|
||||
PROTOTYPE_FACTION_IDS,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue