Skip to content

Commit bd1e89d

Browse files
committed
fix(e2e): compile the desktop executor routes before timing executor calls
1 parent edc1d47 commit bd1e89d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎apps/sim/scripts/test-desktop-inbox-e2e.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,17 @@ async function run() {
413413
assert(registration.reconcileMs < PICKUP_GRACE_SECONDS * 1000)
414414
})
415415

416+
/** `next dev` compiles a route on its first request, which must not count against the timed checks. */
417+
await check('refuses malformed claim, lease and completion bodies', async () => {
418+
for (const path of [
419+
'/api/desktop/tool/claim',
420+
'/api/desktop/tool/lease',
421+
'/api/desktop/tool/complete',
422+
]) {
423+
await request(desktop, 'POST', path, { body: {}, expected: 400 })
424+
}
425+
})
426+
416427
/** Starts absent, so only the stream open below can mark the device present. */
417428
await redis.del(`desktop:presence:${desktop.deviceId}`)
418429
const doorbell = openDoorbell(desktop)

0 commit comments

Comments
 (0)