mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-18 09:48:09 +00:00
test: assert concrete 500 status on the transient history error
Locks the recover-vs-not classification — only a JobsApiError with status 400 drops to the offset fallback; a 500 must surface as a recorded error without resetting the cursor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -754,9 +754,12 @@ describe('assetsStore - Refactored (Option A)', () => {
|
||||
await store.updateHistory()
|
||||
await store.loadMoreHistory()
|
||||
|
||||
// No offset fallback for transient failures, just a recorded error
|
||||
// No offset fallback for transient failures, just a recorded error.
|
||||
// Asserting the concrete 500 guards the recover-vs-not classification:
|
||||
// only a 400 should drop to the offset fallback.
|
||||
expect(fetchHistoryPage).toHaveBeenCalledTimes(2)
|
||||
expect(store.historyError).toBeInstanceOf(Error)
|
||||
expect(store.historyError).toBeInstanceOf(JobsApiError)
|
||||
expect(store.historyError).toMatchObject({ status: 500 })
|
||||
expect(store.hasMoreHistory).toBe(true)
|
||||
|
||||
// The still-valid cursor is retried on the next attempt
|
||||
|
||||
Reference in New Issue
Block a user