feat: require standalone admin login before the web workbench

This commit is contained in:
AttilaNet
2026-11-10 19:03:22 +08:00
parent 664db51d3b
commit 0230a933b0
12 changed files with 710 additions and 41 deletions
@@ -124,6 +124,14 @@ class WorkbenchBrowserTests(unittest.TestCase):
def fulfill(route, data):
route.fulfill(status=200, content_type="application/json", body=json.dumps(data, ensure_ascii=False))
def test_local_no_password_login_route_returns_to_workbench(self):
self.page.goto(self.base + "/login", wait_until="networkidle")
expect(self.page).to_have_url(self.base + "/")
expect(self.page.locator("#app")).to_be_visible()
expect(self.page.locator("#page-tabs [role=tab]")).to_have_count(15)
self.assertEqual(self.page.locator("#auth-dialog, #auth-form").count(), 0)
self.assertEqual(self.errors, [])
def test_all_pages_are_read_only_csp_clean_and_responsive(self):
self.open()
writes = []