(page, reportName)
| 388 | } |
| 389 | |
| 390 | async function openReportBasicSettings(page, reportName) { |
| 391 | const header = reportHeaderLocator(page); |
| 392 | const headerVisible = await header.isVisible().catch(() => false); |
| 393 | const headerText = headerVisible ? ((await header.innerText()).trim()) : ''; |
| 394 | if (!headerVisible || !headerText.includes(reportName)) { |
| 395 | await openExistingReport(page, reportName); |
| 396 | } |
| 397 | for (let attempt = 0; attempt < 2; attempt += 1) { |
| 398 | const menu = await openNavigationEntryMenu(page, reportName); |
| 399 | await clickNavigationMenuAction(menu, 'edit', 'report basic settings'); |
| 400 | const sidebarName = page.locator('#sidebarReportName').first(); |
| 401 | const visible = await sidebarName.isVisible().catch(() => false); |
| 402 | if (visible) { |
| 403 | return; |
| 404 | } |
| 405 | await sidebarName.waitFor({ state: 'visible', timeout: 5000 }).catch(() => {}); |
| 406 | if (await sidebarName.isVisible().catch(() => false)) { |
| 407 | return; |
| 408 | } |
| 409 | await openExistingReport(page, reportName); |
| 410 | } |
| 411 | await page.locator('#sidebarReportName').first().waitFor({ state: 'visible', timeout: 15000 }); |
| 412 | } |
| 413 | |
| 414 | async function openReportDataTab(page, reportName) { |
| 415 | await openReportBasicSettings(page, reportName); |
no test coverage detected