mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 19:07:41 +00:00
test: remove narrow renderer and chat visual examples
This commit is contained in:
@@ -3241,7 +3241,6 @@
|
||||
"src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx": 3251,
|
||||
"src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts": 1057,
|
||||
"src/renderer/src/components/browser-pane/workspace-doc/doc-preview-webview-attach.test.ts": 200,
|
||||
"src/renderer/src/components/cmd-j/palette-focus-restore-target.test.ts": 186,
|
||||
"src/renderer/src/components/cmd-j/task-search-activation.test.ts": 1880,
|
||||
"src/renderer/src/components/confirmation-dialog.test.tsx": 1231,
|
||||
"src/renderer/src/components/connect-dialog-outside-dismiss.test.tsx": 1125,
|
||||
|
||||
-10
@@ -10,8 +10,6 @@ const describeEngines = bundles ? describe : describe.skip
|
||||
|
||||
const THEME = { colorScheme: 'light', tokens: {} }
|
||||
const report = (origin) => `
|
||||
<button id="show-b" onclick="document.getElementById('a').hidden=true;document.getElementById('b').hidden=false">B</button>
|
||||
<section id="a">Finance</section><section id="b" hidden>Retail</section>
|
||||
<script>
|
||||
window.reached = {}
|
||||
try { if (document.cookie.indexOf('page-secret') !== -1) window.reached.cookie = true } catch (_) {}
|
||||
@@ -103,14 +101,6 @@ for (const engine of ['chromium', 'webkit']) {
|
||||
return one
|
||||
}
|
||||
|
||||
it("runs the report's own controls", async () => {
|
||||
const { page, report } = await openReport(browser())
|
||||
await report.click('#show-b')
|
||||
expect(await report.evaluate(() => document.getElementById('b').hidden)).toBe(false)
|
||||
expect(await report.evaluate(() => document.getElementById('a').hidden)).toBe(true)
|
||||
await page.close()
|
||||
})
|
||||
|
||||
it("cannot reach the page's document, cookies, storage or origin", async () => {
|
||||
const { page, report } = await openReport(browser())
|
||||
await expect.poll(() => report.evaluate(() => window.settled === true)).toBe(true)
|
||||
|
||||
-8
@@ -125,14 +125,6 @@ async function validateAuthenticatedPairing() {
|
||||
status?._meta?.runtimeId === payload.runtimeId,
|
||||
'paired client runtime ID does not match ready contract'
|
||||
)
|
||||
assert(
|
||||
typeof statusResult?.runtime?.appVersion === 'string',
|
||||
'paired server did not report its Orca app version'
|
||||
)
|
||||
assert(
|
||||
statusResult?.runtime?.capabilities?.includes('updater.remote-control.v1'),
|
||||
'paired server did not advertise remote updater capability'
|
||||
)
|
||||
assert(
|
||||
statusResult?.runtime?.remoteUpdateSupport?.automatic === false &&
|
||||
statusResult.runtime.remoteUpdateSupport.reason === 'manual-service-update-required',
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { ANTIGRAVITY_ACP_DIALECT } from './antigravity-dialect'
|
||||
|
||||
// Shape captured from the server's ask_question when the client advertises form elicitation.
|
||||
const question = { type: 'string', title: 'Pick a color', oneOf: [{ const: '1', title: 'Red' }] }
|
||||
const writeIn = { type: 'string', title: 'Other', description: 'Optional free-form answer' }
|
||||
const form = (message: string, properties: Record<string, unknown>) => ({
|
||||
sessionId: 's1',
|
||||
toolCallId: 'call_1',
|
||||
mode: 'form',
|
||||
message,
|
||||
requestedSchema: { type: 'object', properties }
|
||||
})
|
||||
const present = (params: unknown) => ANTIGRAVITY_ACP_DIALECT.request?.('elicitation/create', params)
|
||||
|
||||
describe('Antigravity ask_question forms', () => {
|
||||
it('shows the question with a write-in field and returns typed text as the answer', () => {
|
||||
const presentation = present(
|
||||
form('The agent has a question.', { q1: question, q1_other: writeIn })
|
||||
)
|
||||
expect(presentation?.body).toMatchObject({
|
||||
kind: 'question',
|
||||
question: 'Pick a color',
|
||||
options: [{ id: 'o1', label: 'Red' }],
|
||||
freeTextQuestionId: 'q1'
|
||||
})
|
||||
expect(
|
||||
presentation?.reply({
|
||||
kind: 'answers',
|
||||
answers: [{ questionId: 'q1', optionIds: [], other: 'Green please' }]
|
||||
})
|
||||
).toEqual({ action: 'accept', content: { q1_other: 'Green please' } })
|
||||
expect(presentation?.reply({ kind: 'option', optionId: 'o1' })).toEqual({
|
||||
action: 'accept',
|
||||
content: { q1: '1' }
|
||||
})
|
||||
expect(presentation?.reply(null)).toEqual({ action: 'cancel' })
|
||||
})
|
||||
|
||||
it('keeps the question as the heading of a lone multi-select card', () => {
|
||||
const toppings = { type: 'array', title: 'Pick toppings', items: { anyOf: question.oneOf } }
|
||||
expect(present(form('The agent has a question.', { q1: toppings }))?.body).toMatchObject({
|
||||
question: 'Pick toppings'
|
||||
})
|
||||
})
|
||||
|
||||
it('leaves other forms, such as forwarded MCP requests, to the shared presentation', () => {
|
||||
expect(present(form('Choose a deployment target', { q1: question }))).toBeUndefined()
|
||||
})
|
||||
})
|
||||
@@ -1,25 +0,0 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { resolvePaletteFocusRestoreTarget } from './palette-focus-restore-target'
|
||||
|
||||
afterEach(() => {
|
||||
document.body.innerHTML = ''
|
||||
})
|
||||
|
||||
function addTerminal(id: string): HTMLTextAreaElement {
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.className = 'xterm-helper-textarea'
|
||||
textarea.dataset.terminal = id
|
||||
document.body.appendChild(textarea)
|
||||
return textarea
|
||||
}
|
||||
|
||||
describe('resolvePaletteFocusRestoreTarget', () => {
|
||||
it('returns the exact previously-focused element when it is still connected', () => {
|
||||
// DOM order may put a retained background terminal before the one the user was typing in.
|
||||
addTerminal('background')
|
||||
const active = addTerminal('active')
|
||||
|
||||
expect(resolvePaletteFocusRestoreTarget(active)).toBe(active)
|
||||
})
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
EMPTY_FORM,
|
||||
applyParsedSshHostInput,
|
||||
getSshTargetDraftConnectionFields
|
||||
} from './ssh-target-draft'
|
||||
|
||||
describe('applyParsedSshHostInput', () => {
|
||||
it('dials the edited Host after an earlier blur', () => {
|
||||
const blurred = applyParsedSshHostInput({ ...EMPTY_FORM, host: 'host-a.example' })
|
||||
const corrected = applyParsedSshHostInput({ ...blurred, host: 'host-b.example' })
|
||||
|
||||
expect(getSshTargetDraftConnectionFields(corrected).configHost).toBe('host-b.example')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user