fix(ui): пояснить выборку сессий и исправить перенос вкладок
This commit is contained in:
1 parent
9bbecfbafe
commit
9d4d9f308f
6 files changed
+46
-3
No files matched your search
@@ -475,3 +475,25 @@ test('Flow: панель подключения удерживает Tab-фок
|
||||
await expect(dialog).toHaveCount(0)
|
||||
expect(writes).toHaveLength(0)
|
||||
})
|
||||
|
||||
|
||||
test('Flow: top-выборка и пустой локальный фильтр не означают отсутствие сессий', async ({ page }, info) => {
|
||||
const control = await setup(page)
|
||||
control.metrics = { conversations: 123, conversationsList: [{ serverId: '1', serverName: 'Экспортёр тест', src: '192.0.2.1', dst: '198.51.100.1', proto: 6, protoName: 'TCP', srcPort: 1234, dstPort: 443, bytes: 200, packets: 2, bps: 100, inIface: 'ether1' }], sources: [{ id: '192.0.2.99', label: 'Другой источник', bytes: 100, packets: 1, bps: 100, percent: 100 }] }
|
||||
await page.getByRole('button', { name: '15м', exact: true }).click()
|
||||
await page.getByRole('tab', { name: 'Сессии', exact: true }).click()
|
||||
const summary = page.getByRole('status', { name: 'Выборка сессий', exact: true })
|
||||
await expect(summary).toContainText('Показано 1 из 1 в выборке')
|
||||
await expect(summary).toContainText('до 50')
|
||||
await page.getByRole('tab', { name: 'Источники', exact: true }).click()
|
||||
await page.getByRole('row').filter({ hasText: 'Другой источник' }).click()
|
||||
await expect(summary).toContainText('Показано 0 из 1 в выборке')
|
||||
await expect(page.getByText('В полученной выборке нет сессий по выбранному фильтру', { exact: true })).toBeVisible()
|
||||
await page.setViewportSize({ width: 320, height: 1000 })
|
||||
await summary.scrollIntoViewIfNeeded()
|
||||
await expect.poll(() => summary.evaluate(el => el.scrollWidth <= el.clientWidth + 1)).toBe(true)
|
||||
await page.addStyleTag({ content: 'nextjs-portal{display:none!important}' })
|
||||
await page.screenshot({ path: info.outputPath('flow-slice-320.png'), animations: 'disabled' })
|
||||
await page.getByRole('button', { name: 'сбросить', exact: true }).click()
|
||||
await expect(summary).toContainText('Показано 1 из 1 в выборке')
|
||||
})
|
||||
Reference in new issue
Block a user