fix: repair admin directory filter layout
All checks were successful
CI / test (pull_request) Successful in 9m21s
CI / deploy (pull_request) Has been skipped

This commit is contained in:
2026-09-14 15:24:41 +03:00
parent 44949996bc
commit 10d2cf0101
7 changed files with 59 additions and 33 deletions

View File

@@ -67,6 +67,23 @@ def main():
expect(page.get_by_role("status")).to_have_text("Показаны 2630 из 30")
assert page.locator("th:visible").count() == 5
assert page.locator(".directory__table-wrap").evaluate("e => e.scrollWidth <= e.clientWidth")
skip_link = page.get_by_role("link", name="Перейти к содержимому")
assert skip_link.evaluate("e => getComputedStyle(e).left === '-999px'")
page.keyboard.press("Tab")
expect(skip_link).to_be_focused()
assert skip_link.evaluate("e => getComputedStyle(e).left === '8px'")
page.keyboard.press("Tab")
assert skip_link.evaluate("e => getComputedStyle(e).left === '-999px'")
for width in (1440, 1024, 921, 920, 768, 621, 620, 390, 320):
page.set_viewport_size({"width": width, "height": 844})
assert page.locator(".directory__filters").evaluate("e => e.scrollWidth <= e.clientWidth")
assert page.locator(".directory__input").evaluate_all("""controls => controls.every(control => {
const field = control.closest('.directory__field').getBoundingClientRect();
const rect = control.getBoundingClientRect();
return rect.left >= field.left - 1 && rect.right <= field.right + 1;
})""")
page.set_viewport_size({"width": 1440, "height": 1000})
page.get_by_label("ФИО или ссылка").fill("Сотрудник 00")
page.get_by_role("button", name="Применить фильтры").click()
expect(page.get_by_role("status")).to_have_text("Показаны 11 из 1")

View File

@@ -18,7 +18,7 @@ def test_health_returns_versions():
response = TestClient(app).get("/api/health")
assert response.status_code == 200
assert response.json()["backend_version"] == "0.8.4"
assert response.json()["backend_version"] == "0.8.5"
def test_api_employees_and_stats_require_admin_session():