2026-10-05 09:41:22 +02:00
|
|
|
# retoor <retoor@molodetz.nl>
|
2026-10-05 12:59:39 +02:00
|
|
|
from tests.conftest import goto_ready, login_admin
|
2026-10-05 09:41:22 +02:00
|
|
|
|
2026-10-05 11:25:41 +02:00
|
|
|
ADMIN_PAGES = ["/admin", "/admin/posts", "/admin/joins", "/admin/services", "/admin/services/backup", "/admin/trash", "/admin/settings", "/admin/users", "/admin/audit", "/admin/backups", "/admin/stats", "/notifications", "/profile/api-key", "/docs/api/admin"]
|
2026-10-05 09:41:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_admin_pages_have_no_js_errors(page, app_server):
|
|
|
|
|
login_admin(page, app_server)
|
|
|
|
|
for path in ADMIN_PAGES:
|
2026-10-05 12:59:39 +02:00
|
|
|
goto_ready(page, app_server + path)
|
2026-10-05 09:41:22 +02:00
|
|
|
page.goto(app_server + "/admin/services/backup", wait_until="domcontentloaded")
|
|
|
|
|
page.click("[data-tab=logs]")
|
|
|
|
|
assert page.locator("[data-panel=logs]").is_visible()
|
|
|
|
|
page.wait_for_timeout(3500)
|
|
|
|
|
assert page.console_errors == []
|