forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
9c5fb4c614
commit
bd073fb00f
113 files changed
+4902
-273
No files matched your search
@@ -94,6 +94,14 @@ test("serves the game and authenticated cloud-save API", async () => {
|
||||
headers: { Authorization: `Bearer ${auth.token}` },
|
||||
});
|
||||
assert.equal(deniedCooldownPolicy.status, 403);
|
||||
const publicPartyBuffPolicy = await (await fetch(`${origin}/api/party-buff-policy`)).json();
|
||||
assert.deepEqual(publicPartyBuffPolicy.config.rules, []);
|
||||
const deniedPartyBuffPolicy = await fetch(`${origin}/api/gm/party-buff-policy`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json", Authorization: `Bearer ${auth.token}` },
|
||||
body: JSON.stringify({ expectedRevision: 0, config: { schemaVersion: 1, rules: [] } }),
|
||||
});
|
||||
assert.equal(deniedPartyBuffPolicy.status, 403);
|
||||
const publicReadiness = await (await fetch(`${origin}/api/companion-spec-readiness`)).json();
|
||||
assert.equal(publicReadiness.revision, 0);
|
||||
assert.equal(publicReadiness.config.statuses["warrior:protection"], "ready");
|
||||
@@ -268,6 +276,18 @@ test("serves the game and authenticated cloud-save API", async () => {
|
||||
assert.equal(publishedCooldownPolicyPayload.config.generic.defensiveHealthPercent, 61);
|
||||
const playerCooldownPolicy = await (await fetch(`${origin}/api/companion-cooldown-policy`)).json();
|
||||
assert.equal(playerCooldownPolicy.config.generic.defensiveHealthPercent, 61);
|
||||
const publishedPartyBuffPolicy = await fetch(`${origin}/api/gm/party-buff-policy`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json", Authorization: `Bearer ${gmAuth.token}` },
|
||||
body: JSON.stringify({
|
||||
expectedRevision: publicPartyBuffPolicy.revision,
|
||||
config: { schemaVersion: 1, rules: [{ abilityId: "wow335-priest-power-word-fortitude", scope: "tank" }] },
|
||||
}),
|
||||
});
|
||||
assert.equal(publishedPartyBuffPolicy.status, 200);
|
||||
assert.equal((await publishedPartyBuffPolicy.json()).revision, 1);
|
||||
const playerPartyBuffPolicy = await (await fetch(`${origin}/api/party-buff-policy`)).json();
|
||||
assert.deepEqual(playerPartyBuffPolicy.config.rules, [{ abilityId: "wow335-priest-power-word-fortitude", scope: "tank" }]);
|
||||
const publishedReadiness = await fetch(`${origin}/api/gm/companion-spec-readiness`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json", Authorization: `Bearer ${gmAuth.token}` },
|
||||
|
||||
Reference in new issue
Block a user