(label: string, body: () => Promise<void>)
| 50 | try { |
| 51 | const page = await app.firstWindow({ timeout: 120_000 }); |
| 52 | const step = async (label: string, body: () => Promise<void>) => { |
| 53 | await body(); |
| 54 | stepIndex += 1; |
| 55 | const slug = label.toLowerCase().replace(/[^a-z0-9]+/g, "-"); |
| 56 | await page.screenshot({ |
| 57 | path: join(runDir, `${String(stepIndex).padStart(2, "0")}-${slug}.png`), |
| 58 | }); |
| 59 | }; |
| 60 | |
| 61 | await step("app boots into the web console", async () => { |
| 62 | await page.getByText("Settings").first().waitFor({ timeout: 120_000 }); |