Loading challenge...
Start a job and poll its status to ready or failed instead of sleeping for a fixed duration
Kick off a background job and poll its status until it transitions to ready (or failed) โ never sleep for a fixed duration
Clicking Start job issues a POST /api/lab/job that returns a signed jobId. The job then walks through queued โ processing โ ready based purely on elapsed time (sealed in the jobId), so the timing is deterministic but not instant.
Tick Seed failure before starting to make the job end in failed instead โ practise handling the unhappy branch.
Start, then poll every 700ms until terminal
Status: idle
Automation hints
#job-start, then poll โ do NOT page.waitForTimeout(10000); fixed sleeps are flaky and slowexpect.poll / toPass on #job-status and assert its data-status attribute reaches ready#job-status[data-status] (not the visible text) โ it cycles queued โ processing โ ready#seed-fail first to drive the failed branch, then assert #job-error renders and #job-result never appearsjobId at GET /api/lab/job?id=โฆ (Cache-Control: no-store) โ you cannot shortcut it from the client