feat: 支持主分组隐藏节点并保留排序

This commit is contained in:
2026-10-05 10:00:06 +08:00
parent b6aa2bf30d
commit 6ed0307ea9
8 changed files with 124 additions and 14 deletions
+11 -1
View File
@@ -78,11 +78,21 @@ test("compact management flows, drag persistence, filters and mobile layout", as
await page.mouse.move(to!.x + 15, to!.y + 15, { steps: 12 });
await page.mouse.up();
await expect.poll(labels).toEqual([initial[1], initial[2], initial[0]]);
await main.getByRole("button", { name: "保存顺序", exact: true }).click();
await main.getByRole("button", { name: "保存主分组", exact: true }).click();
await expect(main.locator(".action-row [role=status]")).toHaveText("已保存");
await page.reload();
await expect.poll(labels).toEqual([initial[1], initial[2], initial[0]]);
const hidden = main.getByRole("checkbox", { name: `主分组隐藏 ${initial[0]}`, exact: true });
await hidden.check();
await main.getByRole("button", { name: "保存主分组", exact: true }).click();
await expect(main.locator(".action-row [role=status]")).toHaveText("已保存");
await page.reload();
await expect(hidden).toBeChecked();
await hidden.uncheck();
await main.getByRole("button", { name: "撤销修改" }).click();
await expect(hidden).toBeChecked();
const newGroup = page
.locator("details")
.filter({ has: page.locator("summary", { hasText: "新建分组" }) });