(page, maxDialogs = 3)
| 314 | } |
| 315 | |
| 316 | async function confirmVisibleDialogs(page, maxDialogs = 3) { |
| 317 | let confirmed = 0; |
| 318 | for (let index = 0; index < maxDialogs; index += 1) { |
| 319 | const confirmButton = page.locator('#analyticsDialogBtnGo').first(); |
| 320 | const visible = await confirmButton.isVisible().catch(() => false); |
| 321 | if (!visible) { |
| 322 | break; |
| 323 | } |
| 324 | await confirmButton.click(); |
| 325 | confirmed += 1; |
| 326 | await page.waitForTimeout(500); |
| 327 | } |
| 328 | return confirmed; |
| 329 | } |
| 330 | |
| 331 | async function waitForNavigationEntryState(page, name, state) { |
| 332 | const entry = navigationEntryLink(page, name); |
no test coverage detected