(page, label, t0)
| 830 | return { total: fetches.length, naming: fetches.filter((entry) => names(entry).has(project)).map((entry) => ({ t: entry.t, url: entry.url.slice(0, 120), body: entry.body.slice(0, 160), page: entry.page })) }; |
| 831 | } |
| 832 | const lampFrames = async (page, label, t0) => { |
| 833 | const frames = []; |
| 834 | for (const at of [0, 250, 1000, 3000]) { |
| 835 | const delay = at - (Date.now() - t0); |
| 836 | if (delay > 0) await wait(delay); |
| 837 | frames.push({ at, label: await agentLabel(page), file: await shot(page, 'K24', `${label}-${at}ms`, `${label}, ${at} ms after the click: the agent lamp.`) }); |
| 838 | } |
| 839 | return frames; |
| 840 | }; |
| 841 | const activeWorkspace = (page) => page.locator('[data-workspace-tab][aria-selected="true"]').first().getAttribute('data-workspace-tab').catch(() => ''); |
| 842 | /** The same text as the fresh view of the project, apart from numbers (times, memory) and spacing. */ |
| 843 | const sameText = (left, right) => left.replace(/\d[\d,.:]*/g, '#').replace(/\s+/g, ' ') === right.replace(/\d[\d,.:]*/g, '#').replace(/\s+/g, ' '); |
no test coverage detected