mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(walkthrough): move source picker into the panel header
This commit is contained in:
1 parent
b01d3ab6db
commit
0d65edfa44
4 files changed
+61
-46
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, vi, beforeAll, beforeEach } from 'vitest'
|
||||
import { render, screen, waitFor } from '@testing-library/react'
|
||||
import { render, screen, waitFor, within } from '@testing-library/react'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
import type { ReactNode } from 'react'
|
||||
@@ -285,6 +285,17 @@ describe('ChangesWalkthroughSheet', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('renders the source picker in the drawer header before any walkthrough exists', async () => {
|
||||
mocks.getChangeWalkthrough.mockResolvedValue(state({ walkthrough: null }))
|
||||
renderSheet()
|
||||
|
||||
const header = screen.getByRole('button', { name: 'Close' }).parentElement
|
||||
expect(header).not.toBeNull()
|
||||
expect(
|
||||
within(header as HTMLElement).getByRole('combobox', { name: 'Changes to walk through' }),
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('sends the branch base', async () => {
|
||||
const user = userEvent.setup()
|
||||
mocks.getChangeWalkthrough.mockResolvedValue(state({ walkthrough: null }))
|
||||
|
||||
Reference in new issue
Block a user