Prototype one free accompanying force into an empty territory with explicit opt-out, shared human/AI pricing, physical elite custody and Guild recipient accounting. Bind pending quotes to their unique saved Guild decision; preserve legacy unstamped full-price declarations. Smuggler battle collection and combined modules remain unfinished and gated. Repair a randomly dealt-out Karama fixture by relocating its actual physical card without changing inventory. Validation: 70 focused tests; typecheck, lint, 4477 offline tests, production build and 43 HTTP tests passed. Independent rules/persistence review completed, including interruption and cancellation. Browser checked the price toggle, three arrivals for two spice, and refresh with unchanged private cards. Two genuine four-profile Basic/Advanced samples completed without rejected candidates but did not use Smuggler. Preserved all 427 opening rooms and original seat/recovery rows (461 rooms after QA/HTTP). SQLite integrity and foreign keys passed. Server remained healthy after the reported power outage; no restart or reset. Verified source tree: bf6e02bf6873ca6d6b01c83481489f55b2c7db0184a7056364343440dae88803
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { createElement } from 'react';
|
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
import { SmugglerShipmentChoice } from '../components/smuggler-shipment';
|
|
|
|
void test('Smuggler controls preserve a real opt-out and distinguish total physical forces from the priced count', () => {
|
|
const quote = { leader: 'emperor-0', amount: 3 };
|
|
const render = (use: boolean, busy = false) =>
|
|
renderToStaticMarkup(
|
|
createElement(SmugglerShipmentChoice, {
|
|
quote,
|
|
use,
|
|
busy,
|
|
onChange() {},
|
|
}),
|
|
);
|
|
const enabled = render(true);
|
|
assert.match(enabled, /checked=""/);
|
|
assert.match(enabled, /price is for 2/);
|
|
assert.match(enabled, /All 3 selected forces leave reserves/);
|
|
assert.doesNotMatch(render(false), /checked=""/);
|
|
assert.match(render(false), /ordinary price applies to every selected force/);
|
|
assert.match(render(true, true), /disabled=""/);
|
|
assert.equal(
|
|
renderToStaticMarkup(
|
|
createElement(SmugglerShipmentChoice, {
|
|
quote: null,
|
|
use: true,
|
|
busy: false,
|
|
onChange() {},
|
|
}),
|
|
),
|
|
'',
|
|
);
|
|
});
|