Skip to content

Commit fa3a642

Browse files
tests(ui): update staging area test to reflect new behaviour
1 parent c5992ec commit fa3a642

File tree

1 file changed

+3
-4
lines changed
  • invokeai/frontend/web/src/features/controlLayers/components/StagingArea

1 file changed

+3
-4
lines changed

invokeai/frontend/web/src/features/controlLayers/components/StagingArea/state.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,9 @@ describe('StagingAreaApi', () => {
707707

708708
// Should end up with the last set of items
709709
expect(api.$items.get()).toBe(items2);
710-
// The selectedItemId retains the old value (1) but $selectedItem will be null
711-
// because item 1 is no longer in the items list
712-
expect(api.$selectedItemId.get()).toBe(1);
713-
expect(api.$selectedItem.get()).toBe(null);
710+
// We expect the selection to have moved to the next existent item
711+
expect(api.$selectedItemId.get()).toBe(2);
712+
expect(api.$selectedItem.get()?.item.item_id).toBe(2);
714713
});
715714

716715
it('should handle multiple progress events for same item', () => {

0 commit comments

Comments
 (0)