(page, selector, value, label)
| 79 | } |
| 80 | |
| 81 | async function fillRequired(page, selector, value, label) { |
| 82 | const locator = page.locator(selector).first(); |
| 83 | await locator.waitFor({ state: 'visible', timeout: 12000 }); |
| 84 | await locator.fill(value); |
| 85 | const currentValue = await locator.inputValue(); |
| 86 | if (currentValue !== value) { |
| 87 | throw new Error(`Could not fill ${label}. Expected "${value}", got "${currentValue}"`); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | async function ensureAnalyticsLoaded(page, config) { |
| 92 | await page.goto(config.baseUrl, { waitUntil: 'domcontentloaded', timeout: 45000 }); |
no test coverage detected