added Branches button into header

This commit is contained in:
Vaclav Tvrdik
2026-10-14 10:33:24 +02:00
parent dc11d4e688
commit ff820a09d7
3 changed files with 12 additions and 6 deletions

View File

@@ -314,7 +314,7 @@ def test_header_shows_head_upstream_and_the_links_of_the_selected_kind():
assert "up to date" in header(view)
st.branch_refs[1] = REFS[1]
branches.render_branches(view, st)
for link in ("checkout", "pull", "push", "fetch", "delete_branch", "files", "commits", "help"):
for link in ("checkout", "pull", "push", "fetch", "delete_branch", "files", "commits", "branches", "help"):
assert f'href="{link}"' in text
assert 'href="checkout_detached"' not in text

View File

@@ -159,7 +159,7 @@ def test_help_popup_lists_every_key():
assert "next / previous change" in html and "open the real file at this line" in html
# working-tree mode: nothing dimmed, every single-action row is a link
assert 'class="dim"' not in html and "uncommitted only" not in html
assert 'href="discard"' in html and 'href="files"' in html and 'href="close"' in html
assert 'href="discard"' in html and 'href="files"' in html and 'href="branches"' in html and 'href="close"' in html
# rows covering two actions stay plain text
assert 'href="next_change"' not in html and 'href="stage"' not in html
# the popup does not list the key that opens it