Update
DevPlace CI / test (push) Failing after 34m59s

This commit is contained in:
2026-06-19 00:08:41 +02:00
parent 0a554ebc32
commit f05ad0f96e
30 changed files with 1296 additions and 235 deletions
+14 -1
View File
@@ -3,7 +3,7 @@
from uuid import uuid4
from datetime import datetime, timezone
from tests.conftest import BASE_URL
from devplacepy.database import get_table
from devplacepy.database import get_table, refresh_snapshot
from devplacepy.utils import make_combined_slug
def seed_admin_news(count=3):
news_table = get_table("news")
@@ -103,6 +103,19 @@ def test_admin_news_landing_toggle(alice):
page.locator(toggle_sel).first.get_attribute("class") or ""
)
assert is_active != was_active
refresh_snapshot()
assert get_table("news").count(landing_locked=1) >= 1
def test_admin_news_featured_locks_row(alice):
page, _ = alice
seed_admin_news()
page.goto(f"{BASE_URL}/admin/news", wait_until="domcontentloaded")
toggle_sel = "form[action$='/toggle'] button.admin-toggle-switch"
page.locator(toggle_sel).first.click()
page.wait_for_url(f"{BASE_URL}/admin/news", wait_until="domcontentloaded")
refresh_snapshot()
assert get_table("news").count(featured_locked=1) >= 1
def test_admin_news_delete(alice):