fix: move run navigation from id link to table row

This commit is contained in:
Anton
2026-05-07 17:03:36 +03:00
parent 1c4ad0bd9d
commit 7fa28e8e47
6 changed files with 31 additions and 9 deletions

View File

@@ -45,8 +45,10 @@ def test_dashboard_limits_latest_runs_to_five():
def test_runs_template_links_to_run_detail():
template = Path("app/templates/runs.html").read_text(encoding="utf-8")
assert 'href="/admin/runs/{{ run.id }}"' in template
assert 'data-row-href="/admin/runs/{{ run.id }}"' in template
assert 'role="link"' in template
assert 'tabindex="0"' in template
assert '<a class="admin__link" href="/admin/runs/{{ run.id }}">' not in template
def test_run_detail_template_extends_base_and_shows_change_groups():
@@ -74,4 +76,14 @@ def test_dashboard_latest_run_rows_link_to_run_detail():
template = Path("app/templates/dashboard.html").read_text(encoding="utf-8")
assert 'data-row-href="/admin/runs/{{ run.id }}"' in template
assert 'href="/admin/runs/{{ run.id }}"' in template
assert 'role="link"' in template
assert 'tabindex="0"' in template
assert '<a class="admin__link" href="/admin/runs/{{ run.id }}">' not in template
def test_admin_js_supports_keyboard_activation_for_clickable_rows():
source = Path("app/static/admin.js").read_text(encoding="utf-8")
assert 'addEventListener("keydown"' in source
assert '"Enter"' in source
assert '" "' in source