diff options
| author | Shoubhit Dash <[email protected]> | 2026-04-07 16:30:13 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-07 11:00:13 +0000 |
| commit | 41612b3dbea7b4e30a5a83678d2526dbeae9b61a (patch) | |
| tree | 503fcb2bce0be0bb945f7572e3edb2859263145e /packages/app/e2e/prompt | |
| parent | c2d2ca352252a922354c89bfbdb135cf1abfe1b6 (diff) | |
| download | opencode-41612b3dbea7b4e30a5a83678d2526dbeae9b61a.tar.gz opencode-41612b3dbea7b4e30a5a83678d2526dbeae9b61a.zip | |
Move auto-accept permissions to settings (#21308)
Diffstat (limited to 'packages/app/e2e/prompt')
| -rw-r--r-- | packages/app/e2e/prompt/prompt-shell.spec.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/app/e2e/prompt/prompt-shell.spec.ts b/packages/app/e2e/prompt/prompt-shell.spec.ts index 28fa02dcd..81af4cb1b 100644 --- a/packages/app/e2e/prompt/prompt-shell.spec.ts +++ b/packages/app/e2e/prompt/prompt-shell.spec.ts @@ -1,6 +1,6 @@ import type { ToolPart } from "@opencode-ai/sdk/v2/client" import { test, expect } from "../fixtures" -import { withSession } from "../actions" +import { closeDialog, openSettings, withSession } from "../actions" import { promptModelSelector, promptSelector, promptVariantSelector } from "../selectors" const isBash = (part: unknown): part is ToolPart => { @@ -19,12 +19,15 @@ test("shell mode runs a command in the project directory", async ({ page, projec await withSession(project.sdk, `e2e shell ${Date.now()}`, async (session) => { project.trackSession(session.id) await project.gotoSession(session.id) - const button = page.locator('[data-action="prompt-permissions"]').first() - await expect(button).toBeVisible() - if ((await button.getAttribute("aria-pressed")) !== "true") { - await button.click() - await expect(button).toHaveAttribute("aria-pressed", "true") + const dialog = await openSettings(page) + const toggle = dialog.locator('[data-action="settings-auto-accept-permissions"]').first() + const input = toggle.locator('[data-slot="switch-input"]').first() + await expect(toggle).toBeVisible() + if ((await input.getAttribute("aria-checked")) !== "true") { + await toggle.locator('[data-slot="switch-control"]').click() + await expect(input).toHaveAttribute("aria-checked", "true") } + await closeDialog(page, dialog) await project.shell(cmd) await expect |
