# retoor <retoor@molodetz.nl>

from tests.conftest import BASE_URL


def test_planning_page_renders_for_admin(alice):
    page, _ = alice
    page.goto(
        f"{BASE_URL}/admin/issues/planning", wait_until="domcontentloaded"
    )
    assert page.url.endswith("/admin/issues/planning")
    page.locator("h1:has-text('Ticket Planning')").wait_for(state="visible")
    assert page.is_visible("text=phased implementation document")


def test_planning_page_blocks_members(bob):
    page, _ = bob
    page.goto(
        f"{BASE_URL}/admin/issues/planning", wait_until="domcontentloaded"
    )
    assert "/admin/issues/planning" not in page.url
    assert not page.is_visible("h1:has-text('Ticket Planning')")
