Verify backtick shortcut for sidebar toggle with tooltip - The feature to add a backtick shortcut to toggle the left side panel was already implemented. On hover of the toggle button, a tooltip shows the shortcut info.

This commit is contained in:
Cody Seibert
2025-12-09 08:13:03 -05:00
parent 4724fab62a
commit 04b54bfadf
7 changed files with 503 additions and 23 deletions

View File

@@ -1304,3 +1304,44 @@ export async function closeDialogWithEscape(page: Page): Promise<void> {
await page.keyboard.press("Escape");
await page.waitForTimeout(100); // Give dialog time to close
}
/**
* Wait for a toast notification with specific text to appear
*/
export async function waitForToast(
page: Page,
text: string,
options?: { timeout?: number }
): Promise<Locator> {
const toast = page.locator(`[data-sonner-toast]:has-text("${text}")`).first();
await toast.waitFor({
timeout: options?.timeout ?? 5000,
state: "visible",
});
return toast;
}
/**
* Check if project analysis is in progress (analyzing spinner is visible)
*/
export async function isProjectAnalyzingVisible(page: Page): Promise<boolean> {
const analyzingText = page.locator('p:has-text("AI agent is analyzing")');
return await analyzingText.isVisible().catch(() => false);
}
/**
* Wait for project analysis to complete (no longer analyzing)
*/
export async function waitForProjectAnalysisComplete(
page: Page,
options?: { timeout?: number }
): Promise<void> {
// Wait for the analyzing text to disappear
const analyzingText = page.locator('p:has-text("AI agent is analyzing")');
await analyzingText.waitFor({
timeout: options?.timeout ?? 10000,
state: "hidden",
}).catch(() => {
// It may never have been visible, that's ok
});
}