fix(HEL-233): 去掉系统管理按钮属性多余引号,恢复点击

五个无值 data-system-* 属性名后多写了引号,选择器匹配失败导致按钮完全无效。
toast 改为在未打开抽屉时也能挂载,并补源码与真实点击回归。

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
总工
2026-08-29 13:14:23 +08:00
co-authored by Cursor multica-agent
parent 13cd9940f7
commit cefc86917d
3 changed files with 37 additions and 6 deletions
+19
View File
@@ -57,3 +57,22 @@ class MobileSystemPagesRegressionTests(unittest.TestCase):
'location.assign("/login/")',
):
self.assertIn(marker, pages)
def test_system_boolean_attrs_do_not_have_stray_quotes(self) -> None:
pages = PAGES.read_text(encoding="utf-8")
stray = re.findall(r'data-system-[a-z-]*"(?=[>\s])', pages)
self.assertEqual(
stray,
[],
"boolean data-system attributes must not have a trailing quote before > or space",
)
for name in (
"data-system-save-birth",
"data-system-save-password",
"data-system-add-model",
"data-system-save-models",
"data-system-save-market",
"data-system-refresh",
):
self.assertIn(name, pages)
self.assertNotIn(name + '">', pages)