Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions frontend/src/App.coverage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,10 @@ describe('App orchestration coverage', () => {
expect(screen.getAllByText('<Billing & Core>').length).toBeGreaterThan(0)
fireEvent.click(screen.getByRole('button', { name: '전체 보기' }))
expect(screen.getByRole('heading', { name: '프로젝트' })).toBeInTheDocument()
fireEvent.click(screen.getAllByRole('button', { name: '열기' })[1]!)
const openButtons = await screen.findAllByRole('button', { name: '열기' })
fireEvent.click(openButtons[1]!)
expect(screen.getByRole('heading', { name: '다이어그램' })).toBeInTheDocument()
await screen.findByText('ERD_all_2')
fireEvent.change(screen.getByLabelText('다이어그램 검색'), { target: { value: 'no-match' } })
expect(screen.getByText('검색 결과가 없습니다.')).toBeInTheDocument()
fireEvent.change(screen.getByLabelText('다이어그램 검색'), { target: { value: 'failed' } })
Expand Down Expand Up @@ -609,8 +611,9 @@ describe('App orchestration coverage', () => {
it('logs auto-layout failures and preserves nodes added after the undo snapshot', async () => {
await renderReadyApp()
fireEvent.click(screen.getByRole('button', { name: '다이어그램' }))
const openButtons = await screen.findAllByRole('button', { name: '열기' })
vi.useFakeTimers()
fireEvent.click(screen.getAllByRole('button', { name: '열기' })[0]!)
fireEvent.click(openButtons[0]!)
await act(async () => {
vi.advanceTimersByTime(1000)
await Promise.resolve()
Expand Down Expand Up @@ -640,8 +643,9 @@ describe('App orchestration coverage', () => {
.mockRejectedValueOnce(new Error('terminal refresh down'))
await renderReadyApp()
fireEvent.click(screen.getByRole('button', { name: '다이어그램' }))
const openButtons = await screen.findAllByRole('button', { name: '열기' })
vi.useFakeTimers()
fireEvent.click(screen.getAllByRole('button', { name: '열기' })[0]!)
fireEvent.click(openButtons[0]!)
await act(async () => {
vi.advanceTimersByTime(1000)
await Promise.resolve()
Expand All @@ -660,8 +664,16 @@ describe('App orchestration coverage', () => {
.mockReturnValueOnce(new Promise((_resolve, reject) => { rejectSnapshots = reject }))
.mockResolvedValueOnce(snapshots)
await renderReadyApp()
await waitFor(() => {
expect(api.listConnections).toHaveBeenCalledWith('p1')
expect(api.listSnapshots).toHaveBeenCalledWith('p1')
})
fireEvent.click(screen.getByRole('button', { name: '편집기' }))
fireEvent.change(screen.getByLabelText('Project'), { target: { value: 'p2' } })
await waitFor(() => {
expect(api.listConnections).toHaveBeenCalledWith('p2')
expect(api.listSnapshots).toHaveBeenCalledWith('p2')
})
await act(async () => {
rejectConnections(new Error('stale connections'))
rejectSnapshots(new Error('stale snapshots'))
Expand Down Expand Up @@ -743,8 +755,9 @@ describe('App orchestration coverage', () => {
}))
await renderReadyApp()
fireEvent.click(screen.getByRole('button', { name: '다이어그램' }))
const openButtons = await screen.findAllByRole('button', { name: '열기' })
vi.useFakeTimers()
fireEvent.click(screen.getAllByRole('button', { name: '열기' })[0]!)
fireEvent.click(openButtons[0]!)
await act(async () => {
vi.advanceTimersByTime(1000)
await Promise.resolve()
Expand Down Expand Up @@ -783,8 +796,9 @@ describe('App orchestration coverage', () => {
})
await renderReadyApp()
fireEvent.click(screen.getByRole('button', { name: '다이어그램' }))
const openButtons = await screen.findAllByRole('button', { name: '열기' })
vi.useFakeTimers()
fireEvent.click(screen.getAllByRole('button', { name: '열기' })[0]!)
fireEvent.click(openButtons[0]!)
await act(async () => {
vi.advanceTimersByTime(1000)
await Promise.resolve()
Expand Down
Loading