fix(ui): обозначить выбранные состояния и поиск трафика

This commit is contained in:
Denozordec committed 2026-09-28 17:02:16 +07:00
1 parent 460cf67313
commit 48b7a061c1
6 files changed
+44 -10

No files matched your search

+19
View File
@@ -427,3 +427,22 @@ test('Flow: месячный отчёт доступен серверу без
await expect(inactive).toHaveAttribute('aria-pressed', 'true')
await expect(page.getByRole('region', { name: 'Месячный отчёт' })).toBeVisible()
})
test('Flow: клавиатурный выбор сервера и месяца имеет доступное состояние', async ({ page }) => {
await setup(page)
await expect(page.getByRole('group', { name: 'Разделы трафика' }).getByRole('button', { name: 'Потоки', exact: true })).toHaveAttribute('aria-pressed', 'true')
const second = page.getByRole('button').filter({ hasText: 'Экспортёр второй' })
await second.focus()
await page.keyboard.press('Enter')
await expect(second).toHaveAttribute('aria-pressed', 'true')
await expect(page.getByRole('heading', { name: 'Экспортёр второй', exact: true })).toBeVisible()
await page.getByRole('textbox', { name: 'Поиск потоков', exact: true }).fill('Экспортёр тест')
await expect(page.getByRole('heading', { name: 'Экспортёр второй', exact: true })).toBeVisible()
await page.getByRole('textbox', { name: 'Поиск потоков', exact: true }).fill('')
const month = page.getByRole('button', { name: 'Месяц', exact: true })
await month.focus()
await page.keyboard.press('Space')
await expect(month).toHaveAttribute('aria-pressed', 'true')
await expect(page.getByLabel('Месяц отчёта (UTC)', { exact: true })).toBeVisible()
})