forked from retoor/devplacepy
feat: add TTLCache for get_cache_version and TEMPLATE_AUTO_RELOAD config with Makefile worker count variables
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
|
||||
from tests.conftest import BASE_URL
|
||||
|
||||
|
||||
def test_admin_bots_page_loads(alice):
|
||||
page, _ = alice
|
||||
page.goto(f"{BASE_URL}/admin/bots", wait_until="domcontentloaded")
|
||||
assert page.is_visible("text=Bot Monitor")
|
||||
assert page.locator("#bots-grid").count() == 1
|
||||
|
||||
|
||||
def test_admin_bots_sidebar_link(alice):
|
||||
page, _ = alice
|
||||
page.goto(f"{BASE_URL}/admin/services", wait_until="domcontentloaded")
|
||||
link = page.locator("a.sidebar-link[href='/admin/bots']")
|
||||
link.wait_for(state="visible")
|
||||
assert link.count() == 1
|
||||
|
||||
|
||||
def test_admin_bots_redirect_unauth(page, app_server):
|
||||
page.goto(f"{BASE_URL}/admin/bots", wait_until="domcontentloaded")
|
||||
assert page.url.startswith(f"{BASE_URL}/auth/login")
|
||||
Reference in New Issue
Block a user