from app.admin_ui.navigation import nav


def test_v4801_admin_menu_is_collapsed_by_default_on_primary_pages():
    html = nav("operations")
    assert '<details class="cf-admin-nav">' in html
    assert '<details class="cf-admin-nav" open>' not in html


def test_v4801_admin_menu_opens_when_current_page_is_admin_area():
    html = nav("outbox")
    assert '<details class="cf-admin-nav" open>' in html
    assert '<summary class="cf-nav-link active">' in html
