Charters: tests follow the popup, the tutorial waits only for a picker on screen

The tutorial waited for a charter whenever one was due, also where the
picker is not shown (seeded tests); it now waits only while the picker is
open. Two tests still read the old wording for own subsea cables (level 9
or Tier 1 now), and the route fuzz signs the classic charter on both pages
when a normal game starts, so neither shows charter buttons the other
has not.
This commit is contained in:
Frederic Jung 2026-11-06 08:45:42 +01:00
parent 934a83588a
commit 50e0119497
No known key found for this signature in database
3 changed files with 6 additions and 3 deletions

View file

@ -410,9 +410,9 @@ test('#22 Tier 1 networks can lay their own subsea cable', () => {
const { ev, dom, errors } = load();
ev("ACT.start({});S.cash=2e8;S.lvl=4;for(const g of GOALS)S.done[g.id]=0;ACT.launchBB({city:'fra'});ACT.buildPop({city:'lon'});ACT.buildPop({city:'nyc'});compute()");
const card = () => dom.window.document.getElementById('modalCard').textContent;
// not before Tier 1
// not before Tier 1 or customer level 9 (#300)
ev("UI.lmode='df';UI.via=null;openLinkModal('lon','nyc')");
assert.match(card(), /Tier 1 only/);
assert.match(card(), /level 9 or Tier 1/);
assert.match(ev("ownCabWhy('lon','nyc')"), /Tier 1/);
ev('ACT.orderCable()');
assert.equal(ev("S.links.filter(l=>l.own&&l.sub).length"), 0, 'refused before Tier 1');