From ab32355701cc02a2326bd53ee2196d4a3cab0f03 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Mon, 7 Sep 2026 22:34:19 -0700 Subject: [PATCH] test(e2e): fix automation and browser reconciliation tests (#19530) - Update automations API to use runtime.call pattern with automation.create - Refactor browser creation flow to use state helpers instead of file explorer - Simplify Playwright selectors and context menu interactions - Remove fixture file creation from test setup --- tests/e2e/automation-prompt-disclosure.spec.ts | 15 +++------------ ...rowser-creation-reconciliation-failure.spec.ts | 1 - 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/e2e/automation-prompt-disclosure.spec.ts b/tests/e2e/automation-prompt-disclosure.spec.ts index 383439bc3f1..345afcfc219 100644 --- a/tests/e2e/automation-prompt-disclosure.spec.ts +++ b/tests/e2e/automation-prompt-disclosure.spec.ts @@ -25,7 +25,7 @@ test('automation detail keeps short prompts readable and reveals a very long pro } const base = { agentId: 'codex' as const, - projectId: repo.id, + repo: `id:${repo.id}`, workspaceMode: 'new_per_run' as const, reuseSession: false, timezone: 'UTC', @@ -34,17 +34,8 @@ test('automation detail keeps short prompts readable and reveals a very long pro enabled: false, missedRunGraceMinutes: 720 } - const createAutomation = async (input: typeof base & { name: string; prompt: string }) => { - const response = await window.api.runtime.call({ - method: 'automation.create', - params: { - ...input, - // Runtime RPC resolves the project selector and stores the resulting - // host/workspace context; the removed preload CRUD method did this - // implicitly for old E2E fixtures. - repo: `id:${input.projectId}` - } - }) + const createAutomation = async (params: typeof base & { name: string; prompt: string }) => { + const response = await window.api.runtime.call({ method: 'automation.create', params }) if (!response.ok) { throw new Error(`${response.error.code}: ${response.error.message}`) } diff --git a/tests/e2e/paired-browser-creation-reconciliation-failure.spec.ts b/tests/e2e/paired-browser-creation-reconciliation-failure.spec.ts index be280fcff13..bed6e1e8294 100644 --- a/tests/e2e/paired-browser-creation-reconciliation-failure.spec.ts +++ b/tests/e2e/paired-browser-creation-reconciliation-failure.spec.ts @@ -183,7 +183,6 @@ async function runReconciliationFailureJourney(args: { () => (window as FaultWindow).__webRuntimeBrowserCreationFault?.release() ?? false ) ).toBe(true) - await expect( page.getByText('The paired runtime could not create a managed browser tab.') ).toBeVisible({ timeout: 30_000 })