このコミットが含まれているのは:
@@ -75,4 +75,23 @@ describe ('PostImportReviewPage', () => {
|
||||
skipReason: 'existing' })
|
||||
})
|
||||
})
|
||||
|
||||
it ('keeps the dialogue open when save validation fails', async () => {
|
||||
const row = buildPostImportRow ({ attributes: { title: 'title' } })
|
||||
savePostImportSession ('session', { source: row.url, rows: [row], repairMode: 'all' })
|
||||
api.apiPost.mockResolvedValue ({
|
||||
rows: [buildPostImportRow ({
|
||||
sourceRow: row.sourceRow,
|
||||
validationErrors: {
|
||||
originalCreatedAt: ['オリジナルの作成日時の範囲は1分以上必要です.'] } })] })
|
||||
|
||||
renderPage ()
|
||||
fireEvent.click (await screen.findByRole ('button', { name: '編輯' }))
|
||||
fireEvent.click (await screen.findByRole ('button', { name: '編輯内容を保存' }))
|
||||
|
||||
expect (await screen.findByText ('投稿を編輯')).toBeInTheDocument ()
|
||||
expect (screen.getByText ('オリジナルの作成日時の範囲は1分以上必要です.'))
|
||||
.toBeInTheDocument ()
|
||||
expect (api.apiPost).toHaveBeenCalledTimes (1)
|
||||
})
|
||||
})
|
||||
|
||||
新しい課題から参照
ユーザをブロックする