forked from retoor/devplacepy
Render markdown in gist and project sidebar titles; add content visibility and GIF picker
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -160,3 +160,20 @@ def test_admin_news_featured_toggle(alice):
|
||||
page.locator(toggle_sel).first.get_attribute("class") or ""
|
||||
)
|
||||
assert is_active != was_active
|
||||
|
||||
|
||||
def test_admin_news_visibility_select_offers_every_status_and_saves(alice):
|
||||
page, _ = alice
|
||||
seed_admin_news()
|
||||
page.goto(f"{BASE_URL}/admin/news", wait_until="domcontentloaded")
|
||||
select = page.locator("form[action*='/visibility'] select").nth(1)
|
||||
assert select.locator("option").all_text_contents() == ["Published", "Hidden", "Offline"]
|
||||
with page.expect_navigation(wait_until="domcontentloaded"):
|
||||
select.select_option("hidden")
|
||||
refresh_snapshot()
|
||||
statuses = sorted(r["status"] for r in get_table("news").find(deleted_at=None))
|
||||
assert "hidden" in statuses
|
||||
page.goto(f"{BASE_URL}/admin/news", wait_until="domcontentloaded")
|
||||
selects = page.locator("form[action*='/visibility'] select")
|
||||
values = [selects.nth(i).input_value() for i in range(selects.count())]
|
||||
assert "hidden" in values
|
||||
|
||||
Reference in New Issue
Block a user