Implement both rescue bands with legal physical casualty routing, owner controls, all four bot profiles and durable battle receipts. Preserve paid support, elite identity, killed/returned leader custody and replay rejection. New Advanced Atreides skill choices exclude Suk while the KH loss-count ruling is pending; legacy assigned combinations retain their preflight guard. Public gates remain. Independent review fixed stale dead trainer assignments and detached rescue receipts. Final focused Suk/Leader Skills union: 46 passed. Typecheck, lint, 4,452 offline tests, production build and 43 HTTP tests passed on unchanged source tree 3b76239a46d0ba874299495e64295a5eaaa8f2415c3e9a041bee944bbce50c5a. Actual browser rescue and refresh retained counters, private hand and pending winner card cleanup. Two four-profile Basic/Advanced smoke games completed with JSON restoration and no rejected actions; neither exercised a Suk rescue. After the outage report the server was healthy. All 360 pre-check rooms and original seat/recovery records are unchanged; checks added 33 rooms. SQLite integrity and foreign-key checks pass. No server restart or database reset.
21 lines
1.2 KiB
TypeScript
21 lines
1.2 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
import { createElement } from 'react';
|
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
import { SukGraduatePanel, sukRescueLabel } from '../components/suk-graduate';
|
|
|
|
void test('Suk controls explain physical destinations, offer decline only where legal, and require a choice', () => {
|
|
const options = [{ normal: 0, elite: 0, kept: null },
|
|
{ normal: 2, elite: 1, kept: { key: 'wind_pass:14', kind: 'elite' as const } }];
|
|
const markup = renderToStaticMarkup(createElement(SukGraduatePanel, {
|
|
decision: { kind: 'sukRescue', player: 'a', event: 'battle-1', territory: 'wind_pass', mode: 'skilled', options },
|
|
act: () => { throw new Error('render must not submit'); }, busy: true,
|
|
}));
|
|
assert.match(markup, /Forces to save with Suk Graduate/);
|
|
assert.match(markup, /Do not rescue any forces/);
|
|
assert.match(markup, /keep 1 elite in sector 14; return 2 to reserves/);
|
|
assert.match(markup, /paid battle support is unchanged/);
|
|
assert.match(markup, /<button[^>]*disabled/);
|
|
assert.equal(sukRescueLabel({ normal: 1, elite: 0, kept: null }), 'Save 1 ordinary + 0 elite: return 1 to reserves');
|
|
});
|