mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
fix(sessions): render picker views inside matching tab panels
This commit is contained in:
1 parent
c41eff304c
commit
1270e4b52e
2 files changed
+25
-4
No files matched your search
@@ -500,6 +500,20 @@ describe('SessionPickerDialog', () => {
|
||||
expect(combobox()).toHaveAttribute('placeholder', 'Search sessions...')
|
||||
})
|
||||
|
||||
it('exposes a tabpanel labelled by the active tab and swaps panels on tab switch', async () => {
|
||||
renderPicker()
|
||||
|
||||
const sessionsPanel = screen.getByRole('tabpanel', { name: 'Sessions' })
|
||||
expect(sessionsPanel).toHaveAttribute('data-state', 'active')
|
||||
expect(screen.queryByRole('tabpanel', { name: 'Projects' })).not.toBeInTheDocument()
|
||||
|
||||
openProjectsTab()
|
||||
|
||||
const projectsPanel = await screen.findByRole('tabpanel', { name: 'Projects' })
|
||||
expect(projectsPanel).toHaveAttribute('data-state', 'active')
|
||||
expect(screen.queryByRole('tabpanel', { name: 'Sessions' })).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('lists repos in the projects tab and opens the cursor repo on Enter', async () => {
|
||||
mocks.repos = [repo(1, 'alpha', '/w/a'), repo(2, 'beta', '/w/b')]
|
||||
const { onSelectRepo } = renderPicker()
|
||||
|
||||
Reference in new issue
Block a user