Allow Emperor gifts during Moritani extortion
Verify and publish checkpoint container / container (push) Successful in 11m51s
Verify and publish checkpoint container / container (push) Successful in 11m51s
This commit is contained in:
1 parent
6cec4ed78b
commit
538247e777
8 files changed
+307
-4
No files matched your search
@@ -78,3 +78,23 @@ void test('the real Guild timing table exposes the gift only to the Emperor', ()
|
||||
assert.doesNotMatch(table(observer), /Share spice with Guild/);
|
||||
assert.match(table(own, true), /<button\b[^>]*disabled=""[^>]*>Share spice<\/button>/);
|
||||
});
|
||||
|
||||
void test('an Extortion quote presents the recipient and restores its original decision after Karama', () => {
|
||||
const game = fixture();
|
||||
// Isolate the component contract: the underlying Guild fixture supplies the
|
||||
// seats, while this projected Extortion choice and quote are simulated.
|
||||
const decision = {kind:'moritaniExtortion' as const, player:'h', event:'extortion-test'};
|
||||
const own: GameView = {...viewGame(game, 'e'), decision, emperorGuildTimingGift:null,
|
||||
emperorExtortionGift:{recipient:'h', maximum:4}};
|
||||
const observer: GameView = {...viewGame(game, 'h'), decision, emperorGuildTimingGift:null,
|
||||
emperorExtortionGift:null};
|
||||
const html = component(own);
|
||||
assert.match(html, /Share spice with Harkonnen/);
|
||||
assert.match(html, /Moritani Extortion decision resumes after the Karama response/);
|
||||
assert.match(html, /type="number"[^>]*min="1"[^>]*max="4"/);
|
||||
assert.match(html, /<button\b(?![^>]*disabled)[^>]*>Share spice<\/button>/);
|
||||
assert.equal(component(observer), '');
|
||||
assert.match(component(own, true), /<button\b[^>]*disabled=""[^>]*>Share spice<\/button>/);
|
||||
assert.match(table(own), /Moritani Extortion decision resumes after the Karama response/);
|
||||
assert.doesNotMatch(table(observer), /Share spice with Harkonnen/);
|
||||
});
|
||||
Reference in new issue
Block a user