このコミットが含まれているのは:
@@ -26,7 +26,6 @@ const renderPage = (extra = '') => renderWithProviders (<>
|
||||
</>, { route: `/ja/counts/posts?mode=details&timezone=UTC${extra}` })
|
||||
|
||||
beforeEach (() => {
|
||||
vi.spyOn (HTMLCanvasElement.prototype, 'getContext').mockReturnValue (null)
|
||||
fetchCounts.mockReset ().mockResolvedValue (detailResult)
|
||||
fetchCountsDefinition.mockReset ().mockResolvedValue (postDefinition)
|
||||
})
|
||||
@@ -104,4 +103,22 @@ describe ('Counts execution and URL state', () => {
|
||||
expect (await screen.findByRole ('alert')).toHaveTextContent ('73')
|
||||
expect (screen.getByRole ('alert')).toHaveTextContent ('列数が上限')
|
||||
})
|
||||
it ('can execute after an initial column-limit failure with no execution timestamp', async () => {
|
||||
fetchCounts.mockRejectedValueOnce ({ isAxiosError: true,
|
||||
response: { status: 422, data: { error: 'too_many_columns', max_columns: 73 } } })
|
||||
renderPage ()
|
||||
await screen.findByRole ('alert')
|
||||
execute ()
|
||||
await screen.findByText ('Recorded title')
|
||||
await waitFor (() => expect (currentParams ().get ('execution_at')).toBe (executionAt))
|
||||
expect (fetchCounts).toHaveBeenCalledTimes (2)
|
||||
})
|
||||
|
||||
it ('keeps the page heading and common site title consistent', async () => {
|
||||
renderPage ()
|
||||
await screen.findByText ('Recorded title')
|
||||
await waitFor (() => expect (document.title).toContain ('広場集計 | '))
|
||||
expect (screen.getByRole ('heading', { name: '広場集計' })).toBeInTheDocument ()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする