このコミットが含まれているのは:
2026-07-16 12:39:35 +09:00
コミット 0224c4d2f4
14個のファイルの変更371行の追加130行の削除
+19
ファイルの表示
@@ -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)
})
})