mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-18 09:24:02 +08:00
chore(vscode): format sandbox draft test
This commit is contained in:
@@ -41,7 +41,9 @@ describe("PromptInput sandbox toggle", () => {
|
||||
const start = src.indexOf('if (message.type === "sessionCreated")')
|
||||
const end = src.indexOf('if (message.type === "action"', start)
|
||||
const created = src.slice(start, end)
|
||||
const save = created.indexOf("if (source === draftKey()) saveDraft(source, text(), reviewComments(), imageAttach.images())")
|
||||
const save = created.indexOf(
|
||||
"if (source === draftKey()) saveDraft(source, text(), reviewComments(), imageAttach.images())",
|
||||
)
|
||||
const move = created.indexOf("movePromptDraft(")
|
||||
|
||||
expect(start).toBeGreaterThan(-1)
|
||||
@@ -50,17 +52,6 @@ describe("PromptInput sandbox toggle", () => {
|
||||
expect(move).toBeGreaterThan(save)
|
||||
})
|
||||
|
||||
it("keeps success feedback out of the webview toast region", () => {
|
||||
const start = src.indexOf("const handleSandboxMessage =")
|
||||
const end = src.indexOf("const unsubscribe =", start)
|
||||
const handler = src.slice(start, end)
|
||||
|
||||
expect(start).toBeGreaterThan(-1)
|
||||
expect(end).toBeGreaterThan(start)
|
||||
expect(handler).toContain('variant: "error"')
|
||||
expect(handler).not.toContain('variant: "success"')
|
||||
})
|
||||
|
||||
it("uses the internal flag for visibility and effective runtime state for the button", () => {
|
||||
expect(src).toContain("features().sandboxControls")
|
||||
expect(src).toContain("<Show when={sandboxVisible()}>")
|
||||
|
||||
Reference in New Issue
Block a user