refactor: consolidate agent wait methods and use in-memory MCP transport
This commit is contained in:
@@ -422,7 +422,7 @@ export const denyPermission = async (page: Page) => {
|
||||
await denyButton.click();
|
||||
};
|
||||
|
||||
export async function waitForAgentIdle(page: Page, timeout = 30000) {
|
||||
export async function waitForAgentFinishUI(page: Page, timeout = 30000) {
|
||||
const stopButton = page.getByRole('button', { name: /stop|cancel/i });
|
||||
await expect(stopButton).not.toBeVisible({ timeout });
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
waitForPermissionPrompt,
|
||||
allowPermission,
|
||||
denyPermission,
|
||||
waitForAgentIdle,
|
||||
waitForAgentFinishUI,
|
||||
getToolCallCount,
|
||||
} from './helpers/app';
|
||||
import { createTempGitRepo } from './helpers/workspace';
|
||||
@@ -63,7 +63,7 @@ test.describe('permission prompts', () => {
|
||||
|
||||
await waitForPermissionPrompt(page, 30000);
|
||||
await denyPermission(page);
|
||||
await waitForAgentIdle(page);
|
||||
await waitForAgentFinishUI(page);
|
||||
|
||||
expect(existsSync(filePath)).toBe(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user