mirror of
https://github.com/stablyai/orca.git
synced 2026-09-25 00:02:35 +00:00
test(agents): make picker baseline proof omit OMP aliases
This commit is contained in:
@@ -4,13 +4,17 @@ import AgentCombobox from '../../../src/renderer/src/components/agent/AgentCombo
|
||||
import { getAgentCatalog } from '../../../src/renderer/src/lib/agent-catalog'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import './fixture.css'
|
||||
const baseline = new URLSearchParams(window.location.search).get('baseline') === '1'
|
||||
const agents = getAgentCatalog().map((agent) =>
|
||||
baseline && agent.id === 'omp' ? { ...agent, searchAliases: [] } : agent
|
||||
)
|
||||
function App() {
|
||||
const [selected, setSelected] = useState<TuiAgent | null>(null)
|
||||
return (
|
||||
<main className="p-6 bg-background text-foreground space-y-4">
|
||||
<h1>Agent picker</h1>
|
||||
<AgentCombobox
|
||||
agents={getAgentCatalog()}
|
||||
agents={agents}
|
||||
value={selected}
|
||||
onValueChange={setSelected}
|
||||
allowBlankTerminal={false}
|
||||
|
||||
@@ -44,11 +44,13 @@ try {
|
||||
errors.push(error.message)
|
||||
console.error(error)
|
||||
})
|
||||
await page.goto(pathToFileURL(path.join(output, 'renderer/index.html')).href)
|
||||
const baseline = process.env.ORCA_OMP_PICKER_BASELINE === '1'
|
||||
const fixtureUrl = pathToFileURL(path.join(output, 'renderer/index.html'))
|
||||
if (baseline) fixtureUrl.searchParams.set('baseline', '1')
|
||||
await page.goto(fixtureUrl.href)
|
||||
await page.locator('button[role=combobox]').click()
|
||||
const search = page.getByPlaceholder('Search agents...')
|
||||
await search.fill('oh-my-pi')
|
||||
const baseline = process.env.ORCA_OMP_PICKER_BASELINE === '1'
|
||||
await expect(
|
||||
baseline
|
||||
? page.getByText('No agents match your search.')
|
||||
|
||||
Reference in New Issue
Block a user