test(ui): проверить разрывы основного графика трафика
This commit is contained in:
1 parent
ee3dcdacf2
commit
c3ce626b47
2 files changed
+8
No files matched your search
@@ -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,/)
|
||||
|
||||
Reference in new issue
Block a user