mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 02:47:34 +00:00
test: remove low-value policy and parser samples
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -4312,7 +4312,6 @@
|
||||
"src/renderer/src/components/automations/AutomationsPage.behavior.test.tsx": 3389,
|
||||
"src/renderer/src/components/automations/AutomationsPage.edit-destination.test.tsx": 2932,
|
||||
"src/renderer/src/components/automations/ExternalAutomationManagers.test.tsx": 852,
|
||||
"src/renderer/src/components/automations/hosts/automation-captured-owner.test.ts": 379,
|
||||
"src/renderer/src/components/automations/automation-host-cache-controller.test.ts": 411,
|
||||
"src/renderer/src/components/automations/hosts/automation-host-cache.test.ts": 79,
|
||||
"src/renderer/src/components/automations/automation-host-diagnostics.test.ts": 460,
|
||||
@@ -7152,7 +7151,6 @@
|
||||
"src/main/skills/bundled-skill-install/bundled-skill-plan-selection.test.ts": 392,
|
||||
"src/main/skills/bundled-skill-install/bundled-skill-plan.test.ts": 297,
|
||||
"src/main/skills/bundled-skill-install/bundled-skill-workspace-targets.test.ts": 248,
|
||||
"src/main/skills/discovery/claude-plugin-skill-sources-wsl.test.ts": 93,
|
||||
"src/main/skills/discovery/skill-discovery-filter-sharing.test.ts": 239,
|
||||
"src/main/skills/discovery/skill-discovery-stopped-wsl-distro.test.ts": 185,
|
||||
"src/main/skills/discovery/skill-native-discovery.test.ts": 254,
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { parseCheckoutSkippedPaths } from './checkout-skipped-paths'
|
||||
|
||||
describe('parseCheckoutSkippedPaths', () => {
|
||||
it('reads every path git could not replace, apostrophes included', () => {
|
||||
const stderr = [
|
||||
"warning: unable to unlink 'public/logo.png': Permission denied",
|
||||
"error: unable to unlink old ''draft.txt': Invalid argument",
|
||||
"warning: unable to unlink 'it's.md': Permission denied",
|
||||
"Switched to branch 'feature'"
|
||||
].join('\n')
|
||||
|
||||
expect(parseCheckoutSkippedPaths(stderr)).toEqual(['public/logo.png', "'draft.txt", "it's.md"])
|
||||
})
|
||||
})
|
||||
@@ -1,14 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { parseWslClaudePluginMetadataOutput } from './claude-plugin-skill-sources-wsl'
|
||||
|
||||
function record(...fields: string[]): string {
|
||||
return `${fields.join('\0')}\0`
|
||||
}
|
||||
|
||||
describe('WSL Claude plugin metadata', () => {
|
||||
it('rejects malformed metadata responses', () => {
|
||||
expect(() => parseWslClaudePluginMetadataOutput(record('F', '4', '1', ''), 1)).toThrow(
|
||||
'invalid response'
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -1,20 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
automationActionAvailability,
|
||||
isAutomationActionEnabled
|
||||
} from './automation-captured-owner'
|
||||
|
||||
describe('captured owner availability', () => {
|
||||
it('keeps delete and pause fenceable on an orphan while refusing to run it', () => {
|
||||
const orphan = { owner: null, selector: { kind: 'orphan' as const, issue: 'gone' } }
|
||||
expect(automationActionAvailability(orphan, 'delete')).toEqual({
|
||||
kind: 'orphan-fenced',
|
||||
precondition: { selector: { kind: 'orphan' } }
|
||||
})
|
||||
expect(automationActionAvailability(orphan, 'toggle').kind).toBe('orphan-fenced')
|
||||
expect(automationActionAvailability(orphan, 'run').kind).toBe('blocked')
|
||||
expect(automationActionAvailability(orphan, 'edit').kind).toBe('blocked')
|
||||
expect(isAutomationActionEnabled(orphan, 'run')).toBe(false)
|
||||
expect(isAutomationActionEnabled(orphan, 'delete')).toBe(true)
|
||||
})
|
||||
})
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { cleanup, fireEvent, render, screen } from '@testing-library/react'
|
||||
import { afterEach, beforeEach, expect, it, vi } from 'vitest'
|
||||
import type { ProjectHostSetup } from '../../../../../shared/project-types'
|
||||
import type { Repo } from '../../../../../shared/repo-types'
|
||||
import { useAppStore } from '@/store'
|
||||
import {
|
||||
makeTerminalTab,
|
||||
makeWorktree
|
||||
} from '../../worktree-jump/worktree-jump-palette-test-fixtures'
|
||||
import { RepositoryRemoveProjectSection } from './RepositoryRemoveProjectSection'
|
||||
|
||||
beforeEach(() => useAppStore.setState(useAppStore.getInitialState(), true))
|
||||
afterEach(cleanup)
|
||||
|
||||
const repo: Repo = {
|
||||
id: 'repo-1',
|
||||
path: '/tmp/project',
|
||||
displayName: 'project',
|
||||
badgeColor: '',
|
||||
addedAt: 0
|
||||
}
|
||||
const setup: ProjectHostSetup = {
|
||||
id: 'setup-1',
|
||||
projectId: 'project-1',
|
||||
hostId: 'local',
|
||||
repoId: 'repo-1',
|
||||
path: '/tmp/project',
|
||||
displayName: 'project',
|
||||
setupState: 'ready',
|
||||
setupMethod: 'imported-existing-folder',
|
||||
createdAt: 0,
|
||||
updatedAt: 0
|
||||
}
|
||||
|
||||
it('holds removal when a terminal opens while the confirm dialog is up', () => {
|
||||
const removeProject = vi.fn()
|
||||
useAppStore.setState({
|
||||
worktreesByRepo: { 'repo-1': [makeWorktree('wt-1', 'main')] }
|
||||
})
|
||||
render(
|
||||
<RepositoryRemoveProjectSection
|
||||
repo={repo}
|
||||
setups={[setup]}
|
||||
removalScope="project"
|
||||
searchEntry={{ title: 'Remove project' }}
|
||||
forceVisible
|
||||
removeProject={removeProject}
|
||||
/>
|
||||
)
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Remove…' }))
|
||||
useAppStore.setState({
|
||||
tabsByWorktree: { 'wt-1': [makeTerminalTab('tab-1', 'wt-1', 'Terminal')] },
|
||||
ptyIdsByTabId: { 'tab-1': ['pty-1'] }
|
||||
})
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Remove' }))
|
||||
expect(removeProject).not.toHaveBeenCalled()
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Remove' }))
|
||||
expect(removeProject).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
@@ -1,10 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { getAgentLabel } from './agent-title-identity'
|
||||
import { normalizeTerminalTitle } from './agent-title-status'
|
||||
import {
|
||||
getAgentLabel as getTabAgentLabel,
|
||||
resolveExplicitTerminalTitleAgentType
|
||||
} from './terminal-title-agent-type'
|
||||
import { getAgentLabel as getTabAgentLabel } from './terminal-title-agent-type'
|
||||
|
||||
describe('Claude task titles mentioning Gemini', () => {
|
||||
it.each([
|
||||
@@ -19,15 +16,4 @@ describe('Claude task titles mentioning Gemini', () => {
|
||||
expect(getAgentLabel(title)).toBe('Claude Code')
|
||||
expect(getTabAgentLabel(title)).toBe('Claude Code')
|
||||
})
|
||||
|
||||
it.each([
|
||||
'✦ Gemini CLI',
|
||||
'⏲ Working… (orca)',
|
||||
'gemini ready',
|
||||
'⠋ Gemini CLI',
|
||||
'zsh | ⠋ Gemini CLI'
|
||||
])('keeps genuine Gemini identity for %s', (title) => {
|
||||
expect(getAgentLabel(normalizeTerminalTitle(title))).toBe('Gemini CLI')
|
||||
expect(resolveExplicitTerminalTitleAgentType(title)).toBe('gemini')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user