diff --git a/apps/web/tests/cua-permissions.e2e.ts b/apps/web/tests/cua-permissions.e2e.ts index 18072ae8b1..b66390a9bf 100644 --- a/apps/web/tests/cua-permissions.e2e.ts +++ b/apps/web/tests/cua-permissions.e2e.ts @@ -56,9 +56,9 @@ it.skipIf(process.platform !== 'darwin')('keeps system requests pending until fr await scaffold.ctx.settings.mutate('cua', [{ op: 'set', path: ['allowedApps'], value: [] }]) // Application consent remains independent of the session's tool-approval policy. const grant = scaffold.ctx.tools.execute({ agent, signal: new AbortController().signal, - callId: ToolCallId('cua-app-approval'), name: 'run_code', - arguments: { code: 'return await tools.cua({ method: "getApp", params: { selector: "Fixture" } })', - description: 'Request application access' } }) + calls: [{ type: 'tool-call', id: ToolCallId('cua-app-approval'), name: 'run_code', + arguments: JSON.stringify({ code: 'return await tools.cua({ method: "getApp", params: { selector: "Fixture" } })', + description: 'Request application access' }) }] }) const approval = page.locator('[data-question-key]') await Promise.race([approval.waitFor(), grant.then((result) => { throw new Error(`Application selection completed before consent: ${JSON.stringify(result)}`) @@ -66,7 +66,7 @@ it.skipIf(process.platform !== 'darwin')('keeps system requests pending until fr expect(await approval.textContent()).toContain('Fixture') await approval.getByRole('radio', { name: 'Always allow', exact: true }).click() await approval.getByRole('button', { name: 'Submit', exact: true }).click() - expect((await grant).isError).toBe(false) + expect((await grant).results).toMatchObject([{ result: { isError: false } }]) await approval.waitFor({ state: 'hidden' }) await page.getByRole('button', { name: 'Plugins', exact: true }).click() const card = page.locator('[data-plugin-package="@deepseek-ai/dsh-cua-bundle"]')