test(web): expect workspace tooltips to coexist with details

This commit is contained in:
Yif committed 2026-10-12 18:00:43 +08:00
1 parent 1f11e46e70
commit a7aeae3e81
1 file changed
+5 -2
+5 -2
View File
@@ -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)