mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Resolve 21 conflicts from latest main (provider profiles, Windows fixes, 0.1.55-rc.1). Fix all type errors and syntax issues from merge artifacts.
33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
import { expect, type Page } from "@playwright/test";
|
|
import { clickNewChat, clickTerminal } from "./launcher";
|
|
import { setupDeterministicPrompt, waitForTerminalContent } from "./terminal-perf";
|
|
|
|
function terminalSurface(page: Page) {
|
|
return page.locator('[data-testid="terminal-surface"]').first();
|
|
}
|
|
|
|
function composerInput(page: Page) {
|
|
return page.getByRole("textbox", { name: "Message agent..." }).first();
|
|
}
|
|
|
|
export async function expectTerminalCwd(page: Page, expectedPath: string): Promise<void> {
|
|
const terminal = terminalSurface(page);
|
|
await expect(terminal).toBeVisible({ timeout: 20_000 });
|
|
await terminal.click();
|
|
await setupDeterministicPrompt(page, `SENTINEL_${Date.now()}`);
|
|
await terminal.pressSequentially("pwd\n", { delay: 0 });
|
|
await waitForTerminalContent(page, (text) => text.includes(expectedPath), 10_000);
|
|
}
|
|
|
|
export async function createStandaloneTerminalFromLauncher(page: Page): Promise<void> {
|
|
await clickTerminal(page);
|
|
await expect(terminalSurface(page)).toBeVisible({ timeout: 20_000 });
|
|
}
|
|
|
|
export async function createAgentChatFromLauncher(page: Page): Promise<void> {
|
|
await clickNewChat(page);
|
|
await expect(composerInput(page)).toBeVisible({ timeout: 15_000 });
|
|
await expect(composerInput(page)).toBeEditable({ timeout: 15_000 });
|
|
await expect(page.getByTestId("agent-loading")).toHaveCount(0);
|
|
}
|