Compare commits

...

1 Commits

2 changed files with 27 additions and 7 deletions

View File

@@ -93,3 +93,23 @@ test("context panel can open file picker from context actions", async ({ page, s
await expect(dialog).toHaveCount(0)
})
})
test("context tooltip only appears from the session header trigger", async ({ page, sdk, gotoSession }) => {
await withSession(sdk, `e2e context tooltip ${Date.now()}`, async (session) => {
await seedContextSession({ sessionID: session.id, sdk })
await gotoSession(session.id)
const trigger = contextButton(page)
await expect(trigger).toBeVisible()
await trigger.click()
const tab = page.getByRole("tab", { name: "Context" })
await expect(tab).toBeVisible()
await tab.locator('[data-component="progress-circle"]').hover()
await expect(page.locator('[data-component="tooltip"]')).toHaveCount(0)
await trigger.hover()
await expect(page.locator('[data-component="tooltip"]')).toBeVisible()
})
})

View File

@@ -101,10 +101,10 @@ export function SessionContextUsage(props: SessionContextUsageProps) {
return (
<Show when={params.id}>
<Tooltip value={tooltipValue()} placement={props.placement ?? "top"}>
<Switch>
<Match when={variant() === "indicator"}>{circle()}</Match>
<Match when={true}>
<Switch>
<Match when={variant() === "indicator"}>{circle()}</Match>
<Match when={true}>
<Tooltip value={tooltipValue()} placement={props.placement ?? "top"}>
<Button
type="button"
variant="ghost"
@@ -114,9 +114,9 @@ export function SessionContextUsage(props: SessionContextUsageProps) {
>
{circle()}
</Button>
</Match>
</Switch>
</Tooltip>
</Tooltip>
</Match>
</Switch>
</Show>
)
}