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:
co-authored by
Cursor
multica-agent
parent
13cd9940f7
commit
cefc86917d
@@ -355,6 +355,18 @@ test("system management pages render real content instead of placeholders", asyn
|
||||
await expect(page.locator("#m-sys-member-limit")).toBeVisible();
|
||||
});
|
||||
|
||||
test("empty profile save click shows a toast instead of a dead button", async ({ page }) => {
|
||||
await mockMobileApi(page);
|
||||
await openMobile(page);
|
||||
await navigateToFeature(page, "system/profile");
|
||||
await expect(page.locator("[data-system-save-birth]")).toBeVisible();
|
||||
await page.locator("#m-sys-birth-date").fill("");
|
||||
await page.locator("#m-sys-birth-time").fill("");
|
||||
await page.locator("[data-system-save-birth]").click();
|
||||
await expect(page.locator("#m-toast.is-visible")).toBeVisible();
|
||||
await expect(page.locator("#m-toast")).toContainText("请填写完整出生日期和时间");
|
||||
});
|
||||
|
||||
test("non-admin cannot open system admin pages as placeholders", async ({ page }) => {
|
||||
await mockMobileApi(page, { auth: authSession("user", true) });
|
||||
await openMobile(page);
|
||||
|
||||
Reference in New Issue
Block a user