(page, expectedText)
| 741 | } |
| 742 | |
| 743 | async function assertSimulationData(page, expectedText) { |
| 744 | await page.locator('#analyticsDialogContainer').first().waitFor({ state: 'visible', timeout: 30000 }); |
| 745 | const simulation = page.locator('#simulationData').first(); |
| 746 | await simulation.waitFor({ state: 'attached', timeout: 30000 }); |
| 747 | if (!(await simulation.isVisible())) { |
| 748 | await page.locator('.datasourcePreviewRaw summary').click(); |
| 749 | } |
| 750 | const response = JSON.parse(await simulation.innerText()); |
| 751 | const actual = JSON.stringify(response.mappingPreview !== undefined |
| 752 | ? {data: response.data, mappingPreview: response.mappingPreview} : response.data, null, 2); |
| 753 | if (actual !== expectedText) { |
| 754 | throw new Error(`Simulation data mismatch. Expected "${expectedText}", got "${actual}"`); |
| 755 | } |
| 756 | } |
| 757 | |
| 758 | async function closeAnalyticsDialog(page) { |
| 759 | await clickFirst( |
no test coverage detected