Files
cline/apps/vscode/tests/e2e/cli/interactive.test.ts
T
Dominic Cooney 94f5a47a59 sdk migration: squashed pre-2026-06-02 work
Omnibus squash of the 10 oldest SDK-migration commits (authored 2026-05-27
through 2026-06-02), collapsed during the 2026-06-09 rebase onto origin/main.

Squashed commits:
- sdk migration: squashed pre-2026-05-27 work
- sdk migration: squashed 06-05-2026 -- instead of listHistory, use host.get(sessionId) instead
- updat gitignore
- fix xai provider
- fix(vscode): forward Bedrock region + AWS auth to the SDK gateway
- fix(vscode): keep in-progress MCP OAuth flow across reconnects
- fix(vscode): wire auto compact into SDK sessions (#11197)
- fix(vscode): compact Codex OAuth before input cap (#11194)
- fix unauthed user flow
- fix(llms): strip Cerebras reasoning history (#11214)
2026-06-24 14:11:26 +09:00

65 lines
2.0 KiB
TypeScript

import { test } from "@microsoft/tui-test"
import { CLINE_BIN } from "./helpers/constants.js"
import { assertApiTab, assertAutoApproveTab, assertFeaturesTab, assertOtherTab } from "./helpers/page-objects/settings.js"
import { expectVisible, testEnv, typeAndSubmit } from "./utils.js"
test.describe("cline interactive basics", () => {
test.use({
program: { file: CLINE_BIN, args: ["--tui"] },
rows: 50,
columns: 120,
env: testEnv("default"),
})
test("shows logo, prompt, mode toggles, and hints", async ({ terminal }) => {
await expectVisible(terminal, ["What can I do for you?", "@@@@@@", "Plan", "Act", "@ for files", "Tab"])
})
test("shows slash commands after / input", async ({ terminal }) => {
await expectVisible(terminal, "What can I do for you?")
await typeAndSubmit(terminal, "/")
await expectVisible(terminal, ["/help", "/settings", "/models"], {
timeout: 5000,
})
})
test("opens /settings and navigates tabs with left/right arrows", async ({ terminal }) => {
await expectVisible(terminal, "What can I do for you?")
await typeAndSubmit(terminal, "/settings")
await expectVisible(terminal, "Settings (Esc to close)")
// API tab (default)
await assertApiTab(terminal)
await expectVisible(terminal, "Use separate models for Plan and Act")
// Auto-approve tab
terminal.keyRight()
await assertAutoApproveTab(terminal)
// Features tab
terminal.keyRight()
await assertFeaturesTab(terminal)
await expectVisible(terminal, ["Native tool call", "Parallel tool calling"])
// Account tab
terminal.keyRight()
await expectVisible(terminal, ["Sign in to access Cline features", "Sign in with Cline"])
// Other tab
terminal.keyRight()
await assertOtherTab(terminal)
// Left once from Other should move back to Account
terminal.keyLeft()
await expectVisible(terminal, "Sign in to access Cline features")
// Two rights from Account should wrap back to API
terminal.keyRight()
await assertOtherTab(terminal)
terminal.keyRight()
await assertApiTab(terminal)
})
})