Reduce tab preview tooltip delay to 500 ms (#33447)

* Reduce tab preview tooltip delay to 500 ms

* Reduce tab hover card test delay expectations
This commit is contained in:
Jinjing
2026-10-25 00:44:53 -07:00
committed by GitHub
parent a0672840b1
commit 245e5d83fd
3 changed files with 7 additions and 7 deletions
@@ -39,9 +39,9 @@ describe('TabStripTooltipProvider', () => {
vi.useRealTimers()
})
it('holds the first preview until an 800 ms hover', () => {
it('holds the first preview until a 500 ms hover', () => {
hover('first tab')
advance(799)
advance(499)
expect(screen.queryByText('Build')).toBeNull()
advance(1)
expect(screen.getAllByText('Build').length).toBeGreaterThan(0)
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react'
import { TooltipProvider } from '@/components/ui/tooltip'
export const TAB_TOOLTIP_DELAY_MS = 800
export const TAB_TOOLTIP_DELAY_MS = 500
export function TabStripTooltipProvider({ children }: { children: ReactNode }): React.JSX.Element {
return (
+4 -4
View File
@@ -40,7 +40,7 @@ test('whole-tab hover cards wait independently on every hover', async ({
// The left padding and icon used to sit outside the terminal title's trigger.
await orcaPage.mouse.move(firstBox.x + 3, firstBox.y + firstBox.height / 2)
await orcaPage.waitForTimeout(600)
await orcaPage.waitForTimeout(300)
await expect(card).toHaveCount(0)
await expect(cardTitle).toHaveText('Build and test the hover cards')
const program = card.locator('[data-tab-hover-card-program]')
@@ -50,7 +50,7 @@ test('whole-tab hover cards wait independently on every hover', async ({
const programBox = await program.boundingBox()
expect(programBox?.y).toBeGreaterThan((titleBox?.y ?? 0) + (titleBox?.height ?? 0))
await orcaPage.mouse.move(secondBox.x + 3, secondBox.y + secondBox.height / 2)
await orcaPage.waitForTimeout(600)
await orcaPage.waitForTimeout(300)
await expect(card).toHaveCount(0)
await expect(cardTitle).toHaveText('Review changes')
@@ -64,7 +64,7 @@ test('whole-tab hover cards wait independently on every hover', async ({
await expect(card).toHaveCount(0)
await orcaPage.mouse.move(firstBox.x + 3, firstBox.y + firstBox.height / 2)
await orcaPage.waitForTimeout(600)
await orcaPage.waitForTimeout(300)
await expect(card).toHaveCount(0)
await expect(cardTitle).toHaveText('Build and test the hover cards')
@@ -72,7 +72,7 @@ test('whole-tab hover cards wait independently on every hover', async ({
await orcaPage.mouse.move(firstBox.x + 3, firstBox.y + firstBox.height + 100)
await expect(card).toHaveCount(0)
await orcaPage.mouse.move(firstBox.x + 3, firstBox.y + firstBox.height / 2)
await orcaPage.waitForTimeout(600)
await orcaPage.waitForTimeout(300)
await expect(card).toHaveCount(0)
await expect(cardTitle).toHaveText('Build and test the hover cards')