Add whole-territory Truthtrance force questions
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
7552bb5394
commit
f1007a4ea8
9 files changed
+149
-21
No files matched your search
@@ -14,7 +14,7 @@ function markup(value = fact, game: MobileBoard = {}, target = player) {
|
||||
|
||||
void test('force fact controls name physical pools and comparisons without revealing a hidden marker value', () => {
|
||||
const html = markup();
|
||||
for (const value of ['reserves', 'tanks', 'location', 'total', 'normal', 'elite', 'eq', 'gte', 'lte'])
|
||||
for (const value of ['reserves', 'tanks', 'territory', 'location', 'total', 'normal', 'elite', 'eq', 'gte', 'lte'])
|
||||
assert.match(html, new RegExp(`value="${value}"`));
|
||||
assert.match(html, /Number of force counters/);
|
||||
assert.match(html, /Each physical counter counts once, including advisors/);
|
||||
@@ -23,6 +23,17 @@ void test('force fact controls name physical pools and comparisons without revea
|
||||
assert.match(html, /min="0"/); assert.match(html, /max="9007199254740991"/);
|
||||
});
|
||||
|
||||
void test('whole-territory choice names the territory without requiring a sector', () => {
|
||||
const whole: ForceCountFact = { ...fact, zone: { kind: 'territory', territory: 'wind_pass' } };
|
||||
assert.equal(forceCountInputError(whole, {}, player), null);
|
||||
const html = markup(whole);
|
||||
assert.match(html, /Entire board territory/);
|
||||
assert.match(html, /Force territory/);
|
||||
assert.match(html, /Wind Pass/);
|
||||
assert.doesNotMatch(html, /Force sector/);
|
||||
assert.ok(forceCountInputError({ ...whole, zone: { kind: 'territory', territory: 'hidden_mobile_stronghold' } }, {}, player));
|
||||
});
|
||||
|
||||
void test('location choices use the room board and the selected territory sectors', () => {
|
||||
const html = markup({ ...fact, zone: { kind: 'location', territory: 'carthag', sector: 11 } });
|
||||
assert.match(html, /Force territory/); assert.match(html, /Carthag/);
|
||||
|
||||
Reference in new issue
Block a user