fe-map: open paused on the starting map as drawn; paced solve; trails from the starting map; land fades away from cities; Santiago selected at the end
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+12
-2
@@ -49,11 +49,21 @@ const p = await b.newPage({ viewport: { width: 1440, height: 900 } });
|
||||
const errs = []; p.on('pageerror', e => errs.push(e.message));
|
||||
await p.goto(url, { waitUntil: 'load' });
|
||||
const broken = () => p.evaluate(() => +(document.getElementById('status').textContent.match(/broken ([\d,]+)/) || [0, 'NaN'])[1].replace(/,/g, ''));
|
||||
await p.waitForTimeout(300);
|
||||
await p.waitForTimeout(600);
|
||||
const k0 = await broken();
|
||||
const st0 = await p.evaluate(() => [document.getElementById('status').textContent, document.getElementById('mapcap').textContent]);
|
||||
if (!/as drawn/.test(st0[0]) || !/Press Solve/.test(st0[1])) fail('page should open paused on the starting map', st0);
|
||||
await p.waitForTimeout(600);
|
||||
if (await broken() !== k0) fail('starting map changed before Solve was pressed');
|
||||
await p.click('#run');
|
||||
await p.waitForTimeout(2000);
|
||||
const moving = await p.evaluate(() => sv.total);
|
||||
if (!(moving > 0 && moving < 400)) fail('solve should start slowly so the move can be followed', moving);
|
||||
await p.waitForFunction(() => /^Done/.test(document.getElementById('status').textContent), null, { timeout: 120000 });
|
||||
const k1 = await broken();
|
||||
console.log('AE start: broken', k0, '->', k1);
|
||||
const cap1 = await p.evaluate(() => document.getElementById('mapcap').textContent);
|
||||
if (!/^Santiago: \d+ of \d+ flights kept/.test(cap1)) fail('Santiago should be selected when the solve ends', cap1);
|
||||
console.log('AE start: broken', k0, '->', k1, '|', cap1);
|
||||
if (!(k1 < k0)) fail('solver did not reduce the broken count', k0, k1);
|
||||
if (k1 > 60) fail('live solve far from the offline best', k1);
|
||||
await p.screenshot({ path: path.join(here, 'out/femap_solved.png') });
|
||||
|
||||
Reference in New Issue
Block a user