(page, reportName)
| 402 | } |
| 403 | |
| 404 | async function openReportBasicSettings(page, reportName) { |
| 405 | const header = reportHeaderLocator(page); |
| 406 | const headerVisible = await header.isVisible().catch(() => false); |
| 407 | const headerText = headerVisible ? ((await header.innerText()).trim()) : ''; |
| 408 | if (!headerVisible || !headerText.includes(reportName)) { |
| 409 | await openExistingReport(page, reportName); |
| 410 | } |
| 411 | for (let attempt = 0; attempt < 2; attempt += 1) { |
| 412 | const menu = await openNavigationEntryMenu(page, reportName); |
| 413 | await clickNavigationMenuAction(menu, 'edit', 'report basic settings'); |
| 414 | const sidebarName = page.locator('#sidebarReportName').first(); |
| 415 | const visible = await sidebarName.isVisible().catch(() => false); |
| 416 | if (visible) { |
| 417 | return; |
| 418 | } |
| 419 | await sidebarName.waitFor({ state: 'visible', timeout: 5000 }).catch(() => {}); |
| 420 | if (await sidebarName.isVisible().catch(() => false)) { |
| 421 | return; |
| 422 | } |
| 423 | await openExistingReport(page, reportName); |
| 424 | } |
| 425 | await page.locator('#sidebarReportName').first().waitFor({ state: 'visible', timeout: 15000 }); |
| 426 | } |
| 427 | |
| 428 | async function openReportDataTab(page, reportName) { |
| 429 | await openReportBasicSettings(page, reportName); |
no test coverage detected