fix: stop showing failed bark battle drafts as generating

This commit is contained in:
kdletters
2026-05-28 00:50:08 +08:00
parent e14061a0fe
commit 7beaf68893
3 changed files with 11 additions and 6 deletions

View File

@@ -1048,7 +1048,7 @@ test('buildCreationWorkShelfItems maps bark battle works with scene role cover a
);
});
test('bark battle draft generating state follows pending assets or missing three images', () => {
test('bark battle draft generating state only follows pending assets', () => {
const draft = {
workId: 'bark-battle-work-draft',
draftId: 'bark-battle-draft-1',
@@ -1073,6 +1073,12 @@ test('bark battle draft generating state follows pending assets or missing three
expect(hasBarkBattleRequiredImages(draft)).toBe(false);
expect(isPersistedBarkBattleDraftGenerating(draft)).toBe(true);
expect(
isPersistedBarkBattleDraftGenerating({
...draft,
generationStatus: 'partial_failed',
}),
).toBe(false);
expect(
isPersistedBarkBattleDraftGenerating({
...draft,