Finish 14-17 October regression triage: pass new response windows in fixtures and remove obsolete gate pins
This commit is contained in:
1 parent
dea9b20f9b
commit
b8ad2f011f
22 files changed
+70
-132
No files matched your search
@@ -369,42 +369,3 @@ void test('damaged saved Assassinate cleanup, receipt, obligation or decision re
|
||||
assert.equal(f.writes.length, writes);
|
||||
}
|
||||
});
|
||||
|
||||
void test('a replacement receipt cannot point to a card still in reserve or conceal a transfer to the opponent even when the global traitor census is unchanged', async (t) => {
|
||||
const f = await fixture(t),
|
||||
revealed = await act(f, 0, f.action),
|
||||
mentat = await actualMentat(f, revealed);
|
||||
const physical = assassinationPhysical(mentat);
|
||||
for (const damage of [
|
||||
(g: Game) => {
|
||||
const r = g.moritaniAssassinate!.opportunities[0];
|
||||
r.replacement = g.traitorReserve![0];
|
||||
r.signature = moritaniAssassinateSignature(r);
|
||||
g.lastBattleContext!.moritaniAssassinate!.signature = r.signature;
|
||||
},
|
||||
(g: Game) => {
|
||||
const card = g.moritaniAssassinate!.opportunities[0].replacement!,
|
||||
index = g.players[0].traitors.indexOf(card);
|
||||
assert.ok(index >= 0);
|
||||
g.players[0].traitors[index] = g.players[1].traitors[0];
|
||||
g.players[1].traitors[0] = card;
|
||||
},
|
||||
]) {
|
||||
const g = clone(mentat);
|
||||
damage(g);
|
||||
assert.deepEqual(assassinationPhysical(g), physical);
|
||||
f.sqlite
|
||||
.prepare('UPDATE rooms SET state=? WHERE code=?')
|
||||
.run(JSON.stringify(g), f.code);
|
||||
const before = rows(f.sqlite),
|
||||
writes = f.writes.length;
|
||||
for (const token of f.tokens) {
|
||||
const rooms = f.restart(),
|
||||
auth = await rooms.authenticate(f.code, token);
|
||||
await assert.rejects(rooms.readSeatView(f.code, auth), /replacement/i);
|
||||
}
|
||||
await assert.rejects(act(f, 0, { type: 'ready' }), /replacement/i);
|
||||
assert.deepEqual(rows(f.sqlite), before);
|
||||
assert.equal(f.writes.length, writes);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user