test(ui): проверить разрывы основного графика трафика

This commit is contained in:
Denozordec committed 2026-09-24 21:10:42 +07:00
1 parent ee3dcdacf2
commit c3ce626b47
2 files changed
+8

No files matched your search

+3
View File
@@ -130,6 +130,9 @@ test('Итоги трафика: Sparkline сохраняет разрывы и
const control = await setup(page)
control.series = [1, 2, null, 3, 4]
await page.getByRole('button', { name: '24ч', exact: true }).click()
const history = page.getByRole('region', { name: 'История RX/TX' })
await expect(history.locator('.recharts-line-curve')).toHaveCount(2)
await expect.poll(async () => history.locator('.recharts-line-curve').evaluateAll(paths => paths.map(path => (path.getAttribute('d')?.match(/M/g) ?? []).length))).toEqual([2, 2])
const spark = page.getByRole('img', { name: 'История измерений', exact: true }).first()
await expect(spark.locator('path[fill="none"]')).toHaveCount(2)
await expect(spark.locator('path[fill="none"]').nth(1)).toHaveAttribute('d', /^M135\.0,/)