fix: 调整工作空间工具栏层级避免覆盖抽屉

This commit is contained in:
yuxuanhui
2026-09-10 13:16:11 +08:00
parent d403008f9b
commit 758925edb8
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -224,7 +224,7 @@
position: fixed; position: fixed;
top: 0; top: 0;
right: var(--chat-space, 0px); right: var(--chat-space, 0px);
z-index: 1002; z-index: 30;
background: var(--surface); background: var(--surface);
display: flex; display: flex;
align-items: center; align-items: center;
+12
View File
@@ -62,6 +62,18 @@ test("sidebar geometry, recent navigation, user menu and compact tools", async (
).toHaveAttribute("aria-current", "page"); ).toHaveAttribute("aria-current", "page");
await page.getByRole("button", { name: "同步任务", exact: true }).click(); await page.getByRole("button", { name: "同步任务", exact: true }).click();
await expect(page.locator(".job-panel")).toBeVisible(); await expect(page.locator(".job-panel")).toBeVisible();
// The drawer must receive pointer events where the global tools sit behind it.
await expect.poll(() =>
page.getByRole("toolbar").getByRole("button").evaluateAll((buttons) =>
buttons.every((button) => {
const rect = button.getBoundingClientRect();
return Boolean(document.elementFromPoint(
rect.x + rect.width / 2,
rect.y + rect.height / 2,
)?.closest(".job-panel"));
}),
),
).toBe(true);
await page.locator(".job-panel .semi-sidesheet-close").click(); await page.locator(".job-panel .semi-sidesheet-close").click();
await expect(page.locator(".job-panel")).not.toBeVisible(); await expect(page.locator(".job-panel")).not.toBeVisible();
await page.getByRole("button", { name: "切换研究助手" }).click(); await page.getByRole("button", { name: "切换研究助手" }).click();