(project)
| 43 | } |
| 44 | |
| 45 | async function index(project) { |
| 46 | const begin = await json('/api/index', { root_path: FIXTURE, project_name: project }); |
| 47 | report.actions.push({ action: 'POST /api/index', project, root: FIXTURE, acknowledgement: begin }); |
| 48 | const deadline = Date.now() + 180000; |
| 49 | while (Date.now() < deadline) { |
| 50 | const jobs = await json('/api/index-status'); |
| 51 | const job = jobs.find((item) => item.slot === begin.slot); |
| 52 | if (job && job.status !== 'indexing') { |
| 53 | report.actions.push({ action: 'Index terminal state', project, job }); |
| 54 | return job; |
| 55 | } |
| 56 | await delay(500); |
| 57 | } |
| 58 | throw new Error(`Index job timed out: ${project}`); |
| 59 | } |
| 60 | |
| 61 | async function capture(page, name) { |
| 62 | name = proofPrefix + name; |
no test coverage detected