| 58 | for (const mapping of filter.mappings) assert.ok(Object.values(first.reports).includes(mapping.reportId)); |
| 59 | } |
| 60 | const show = async id => { |
| 61 | await page.goto(config.baseUrl + 'pa/' + id); |
| 62 | await page.waitForFunction(() => document.querySelectorAll('.kpiWidgetValue').length === 2 |
| 63 | && ['0-2', '0-3', '0-4', '0-5'].every(id => Chart.getChart('myWidget' + id)?.data.datasets.length)); |
| 64 | await page.locator('#app-splash-screen').waitFor({state: 'hidden'}); |
| 65 | await page.locator('#panoramaQuickFilters select').first().waitFor({state: 'visible'}); |
| 66 | const values = await page.locator('.kpiWidgetValue').allTextContents(); |
| 67 | assert.ok(values[0].includes('€')); |
| 68 | assert.ok(values[1].includes('%')); |
| 69 | }; |
| 70 | await show(first.panoramaId); |
| 71 | await capture('imported-six-tile-panorama'); |
| 72 | await show(first.panoramaId); |