From a7aeae3e81850f4f896d42132a7f9a471aedccea Mon Sep 17 00:00:00 2001 From: Yif <877193178@qq.com> Date: Mon, 12 Oct 2026 18:00:43 +0800 Subject: [PATCH] test(web): expect workspace tooltips to coexist with details --- apps/web/tests/shortcuts-workspace.e2e.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/web/tests/shortcuts-workspace.e2e.ts b/apps/web/tests/shortcuts-workspace.e2e.ts index 3b1e0db1b0..3bb20a0e96 100644 --- a/apps/web/tests/shortcuts-workspace.e2e.ts +++ b/apps/web/tests/shortcuts-workspace.e2e.ts @@ -146,8 +146,11 @@ describe.skipIf(mode === 'record')('web e2e: workspace shortcuts', () => { await workspaceRow.getByText(workspaceLabel, { exact: true }).hover() await details.waitFor() await workspaceRow.getByRole('button', { name: `New session in ${workspaceLabel}`, exact: true }).hover() - await page.getByRole('tooltip').filter({ hasText: 'New Session' }).waitFor() - await expect.poll(() => details.count()).toBe(0) + const newSessionTooltip = page.getByRole('tooltip').filter({ hasText: 'New Session' }) + await newSessionTooltip.waitFor() + expect(await details.isVisible()).toBe(true) + expect(await newSessionTooltip.evaluate(element => Number(getComputedStyle(element).zIndex))) + .toBeGreaterThan(await details.evaluate(element => Number(getComputedStyle(element).zIndex))) await workspaceRow.getByText(workspaceLabel, { exact: true }).hover() await details.waitFor() await page.mouse.move(700, 100)