mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
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:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user