Pass the session key from detached idle-grace tests

Main's #469 tests POSTed /heartbeat and /answer without ?key=, which the
gate now rejects, so those daemons looked dead. The e2e heartbeat counter
also has to match pathname rather than a suffix, now that the URL carries
the key.

Written with AI assistance under maintainer direction.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Abdul Wahab
2026-08-28 05:53:25 +05:00
committed by Abdul Wahab
co-authored by Cursor
parent 7982002dac
commit 377fb112b0
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -843,7 +843,7 @@ describe('new-work-e2e: serve-question decision page', () => {
// the server keeps its real clock, so its own idle grace never fires.
await page.clock.install();
let beats = 0;
page.on('request', (r) => { if (r.url().endsWith('/heartbeat')) beats += 1; });
page.on('request', (r) => { if (new URL(r.url()).pathname === '/heartbeat') beats += 1; });
await page.goto(url, { waitUntil: 'load' });
// Playwright actionability waits on rAF, which the fake clock owns, so
// dispatch the click directly.