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:
Brennan Benson
2026-11-11 13:23:09 -08:00
parent e53ce6c71c
commit 57e9ecdc7d
3 changed files with 35 additions and 4 deletions
@@ -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()
})
@@ -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(
+1 -2
View File
@@ -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": {