(prefix, explicitName)
| 38 | } |
| 39 | |
| 40 | function buildUniqueName(prefix, explicitName) { |
| 41 | if (explicitName) { |
| 42 | return explicitName; |
| 43 | } |
| 44 | const safePrefix = sanitizeNameFragment(prefix) || 'Playwright'; |
| 45 | const suffix = new Date().toISOString().replace(/[^\d]/g, '').slice(0, 17); |
| 46 | return `${safePrefix} ${suffix}`; |
| 47 | } |
| 48 | |
| 49 | async function waitForIdle(page, timeout = 20000) { |
| 50 | await page.waitForLoadState('networkidle', { timeout }).catch(() => {}); |
no test coverage detected