mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
fix(settings): search the wait-for-setup row by its translated title
Reuse the visible row title's translation key in the page-level search entry so localized title searches keep the hooks section, and cover the row's search in the pane test.
This commit is contained in:
@@ -118,3 +118,35 @@ it.each([
|
||||
expect.anything()
|
||||
)
|
||||
})
|
||||
|
||||
it('shows the wait-for-setup row when searching its title', () => {
|
||||
const repo: Repo = {
|
||||
id: 'project-1',
|
||||
path: '/tmp/sample-project',
|
||||
displayName: 'Sample project',
|
||||
badgeColor: '',
|
||||
addedAt: 0
|
||||
}
|
||||
useAppStore.setState({
|
||||
settings: getDefaultSettings('/tmp'),
|
||||
settingsSearchQuery: 'wait for setup to complete before starting agent',
|
||||
repos: [repo]
|
||||
})
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<RepositoryPane
|
||||
repo={repo}
|
||||
yamlHooks={null}
|
||||
hasHooksFile={false}
|
||||
hooksInspectionReady
|
||||
mayNeedUpdate={false}
|
||||
updateRepo={vi.fn()}
|
||||
removeProject={vi.fn()}
|
||||
/>
|
||||
</TooltipProvider>
|
||||
)
|
||||
|
||||
expect(
|
||||
screen.getByRole('switch', { name: 'Wait for setup to complete before starting agent' })
|
||||
).toBeTruthy()
|
||||
})
|
||||
|
||||
+2
-2
@@ -146,8 +146,8 @@ export function getRepositoryGitHooksSearchEntries(
|
||||
'wait for setup before starting agent'
|
||||
),
|
||||
...translateSearchKeyword(
|
||||
'auto.components.settings.repository.search.waitForSetupToCompleteBeforeAgent',
|
||||
'wait for setup to complete before starting agent'
|
||||
'auto.components.settings.RepositoryHooksSection.waitForSetupBeforeAgent',
|
||||
'Wait for setup to complete before starting agent'
|
||||
),
|
||||
...translateSearchKeyword('auto.components.settings.repository.search.80c490b012', 'ask'),
|
||||
...translateSearchKeyword(
|
||||
|
||||
@@ -11298,8 +11298,7 @@
|
||||
"bbbe994528": "Remove project",
|
||||
"cedbe6c02c": "When to run setup",
|
||||
"eefc3e51ef": "GitHub account",
|
||||
"f94afd4078": "Keep fork up to date",
|
||||
"waitForSetupToCompleteBeforeAgent": "wait for setup to complete before starting agent"
|
||||
"f94afd4078": "Keep fork up to date"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
|
||||
Reference in New Issue
Block a user