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
This commit is contained in:
Jinjing
2026-09-07 22:34:19 -07:00
committed by GitHub
parent 3b00cfcb2d
commit ab32355701
2 changed files with 3 additions and 13 deletions
+3 -12
View File
@@ -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}`)
}
@@ -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 })