fix(HEL-730): preserve shared pins and sample icon geometry

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-22 01:51:42 +08:00
co-authored by multica-agent
parent 03bebec94a
commit 64c1116bca
12 changed files with 246 additions and 266 deletions
+62
View File
@@ -43,6 +43,54 @@ try {
"search empty state",
);
await page.locator(".workflow-search input").fill("");
check(
(await page
.locator(".management-header .icon")
.first()
.evaluate((el) => getComputedStyle(el).strokeWidth)) === "1.7px",
"management icon stroke matches approved 1.7",
);
await page.locator(".mg-side .mg-filter").nth(1).hover();
await page.screenshot({
path: path.join(out, "interaction-filter-hover.png"),
});
await page.route("**/api/workflows/*/check", async (route) => {
await new Promise((resolve) => setTimeout(resolve, 400));
await route.continue();
});
await page
.getByRole("button", { name: "检查节点与模型", exact: true })
.click();
await page.locator(".mg-detail .a-btn.loading").waitFor();
await page.screenshot({
path: path.join(out, "interaction-check-loading.png"),
});
check(
true,
"real node check exposes loading feedback under 400ms transport delay",
);
await page.locator(".mg-detail .a-btn.loading").waitFor({ state: "hidden" });
await page.unroute("**/api/workflows/*/check");
const pinButton = page.locator(".mg-pin").first();
await pinButton.click();
check(
(await pinButton.getAttribute("aria-pressed")) === "true",
"workflow pin is selected",
);
await page.goto(base + "/image", { waitUntil: "networkidle" });
check(
(await page
.locator(".sidebar .icon")
.first()
.evaluate((el) => getComputedStyle(el).strokeWidth)) === "1.5px",
"B1 icon stroke remains 1.5",
);
check(
await page.getByText("置顶工作流", { exact: true }).isVisible(),
"library pin is shared with B1 creation rail",
);
await page.goto(base + "/workflows", { waitUntil: "networkidle" });
await page.locator(".mg-pin").first().click();
await page.getByRole("button", { name: "批量标注", exact: true }).click();
await page
.getByRole("checkbox", { name: "全选当前列表", exact: true })
@@ -212,6 +260,20 @@ try {
),
"rapid theme switching keeps the final choice",
);
const advanced = page.locator(".advanced");
await advanced.locator("summary").click();
check(
await advanced.evaluate((el) => el.open),
"settings advanced controls expand",
);
await page.screenshot({
path: path.join(out, "interaction-settings-expanded.png"),
});
await advanced.locator("summary").click();
check(
!(await advanced.evaluate((el) => el.open)),
"settings advanced controls collapse",
);
// Approved sample, downloaded separately through the CLI; do not modify it.
const sampleFile = path.resolve(
"..",