Add optional short alliance victory
Verify and publish checkpoint container / container (push) Successful in 11m2s
Verify and publish checkpoint container / container (push) Successful in 11m2s
This commit is contained in:
1 parent
8fb9f59106
commit
e896570f07
25 files changed
+632
-27
No files matched your search
@@ -17,7 +17,8 @@ export async function verifyLobbyConfiguration(request, adminCookie, report) {
|
||||
let current = await request(url, undefined, adminCookie);
|
||||
assert.equal(current.status, 200); assert.equal(current.rawCookie, null);
|
||||
assert.equal(current.data.editable, true);
|
||||
assert.deepEqual(Object.keys(current.data).sort(), ['advanced', 'blockedReason', 'code', 'control', 'editable', 'host', 'players', 'status', 'strongholdCards', 'techTokens', 'version']);
|
||||
assert.deepEqual(Object.keys(current.data).sort(), ['advanced', 'blockedReason', 'code', 'control', 'editable', 'host', 'players', 'shortAllianceVictory', 'status', 'strongholdCards', 'techTokens', 'version']);
|
||||
assert.equal(current.data.shortAllianceVictory, false);
|
||||
for (const player of current.data.players) assert.deepEqual(Object.keys(player).sort(), ['bot', 'faction', 'hostEligible', 'id', 'name', 'position', 'ready']);
|
||||
const makeInput = action => ({ operationId: randomUUID(), expectedVersion: current.data.version, action, reason: 'Dedicated lobby configuration acceptance' });
|
||||
const firstInput = makeInput({ type: 'rules', advanced: true });
|
||||
@@ -33,6 +34,8 @@ export async function verifyLobbyConfiguration(request, adminCookie, report) {
|
||||
return result;
|
||||
}
|
||||
await apply(firstInput); assert.equal(current.data.advanced, true);
|
||||
await apply(makeInput({ type: 'shortAllianceVictory', enabled: true }));
|
||||
assert.equal(current.data.shortAllianceVictory, true);
|
||||
await apply(makeInput({ type: 'techTokens', enabled: true }));
|
||||
await apply(makeInput({ type: 'strongholdCards', enabled: true }));
|
||||
await apply(makeInput({ type: 'addBot', faction: 'guild', difficulty: 'Easy' }));
|
||||
@@ -44,6 +47,8 @@ export async function verifyLobbyConfiguration(request, adminCookie, report) {
|
||||
assert.equal(current.data.players.length, 2);
|
||||
await apply(makeInput({ type: 'rules', advanced: false })); assert.equal(current.data.strongholdCards, false);
|
||||
await apply(makeInput({ type: 'techTokens', enabled: false }));
|
||||
await apply(makeInput({ type: 'shortAllianceVictory', enabled: false }));
|
||||
assert.equal(current.data.shortAllianceVictory, false);
|
||||
const stale = await request(url, { ...firstInput, operationId: randomUUID() }, adminCookie);
|
||||
assert.equal(stale.status, 409); assert.equal(stale.rawCookie, null);
|
||||
report.checks.push('Neutral admin rules/modules and AI add/configure/remove persist; public-only projection, origin/account/host denial and stale version rejection');
|
||||
|
||||
Reference in new issue
Block a user