Сократить заголовок и ширину колонки ДПО

This commit is contained in:
codex committed 2026-11-27 12:24:26 +03:00
1 parent b394650744
commit 520c1df4f3
7 files changed
+24 -8

No files matched your search

+12 -1
View File
@@ -22,7 +22,7 @@ def test_health_returns_versions():
response = TestClient(app).get("/api/health")
assert response.status_code == 200
assert response.json()["backend_version"] == "2.4.1"
assert response.json()["backend_version"] == "2.4.3"
def test_api_employees_and_stats_require_admin_session():
@@ -168,6 +168,10 @@ def test_directory_export_uses_applied_filters_and_sort_across_pages(db_session)
status="dismissed" if number == 28 else "active",
current_data={
"hse_start_year": 2025 - number,
"sections": [
{"type": "courses_by_year", "courses": [{"title": "Физика"}]},
{"type": "additional_education", "education_format": 2, "items": ["Курс А", "Курс Б"]},
],
"positions": ["Инженер" if number == 29 else "Кафедра физики"],
"contacts": {"address": "=1+1", "phones": ["+7 123"]},
},
@@ -202,6 +206,13 @@ def test_directory_export_uses_applied_filters_and_sort_across_pages(db_session)
assert [cell.value for cell in sheet[1]] == [
cell.get_text(strip=True) for cell in page.select(".directory-table th")
]
assert page.select_one('th[data-column="dpo_count"]').get_text(strip=True) == "ДПО"
assert page.select_one('td[data-column="dpo_count"]').get_text(strip=True) == "2"
columns = {cell.value: cell for cell in sheet[1]}
dpo = columns["ДПО"]
assert sheet.cell(2, dpo.column).value == 2
assert sheet.cell(2, columns["Преподаваемые курсы"].column).value == 1
assert sheet.column_dimensions[dpo.column_letter].width == 10
assert sheet.max_column == 16
assert [cell.value for cell in sheet["A"][1:]] == [f"Export {number:02d}" for number in range(28)]
assert [cell.value for cell in sheet["A"][-3:]] == [