From fa3a6425a61b66ca5af45b141529032e1e709536 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 11 Sep 2025 17:52:16 +1000 Subject: [PATCH] tests(ui): update staging area test to reflect new behaviour --- .../controlLayers/components/StagingArea/state.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/invokeai/frontend/web/src/features/controlLayers/components/StagingArea/state.test.ts b/invokeai/frontend/web/src/features/controlLayers/components/StagingArea/state.test.ts index 2e3af66588..b248c65bf7 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/StagingArea/state.test.ts +++ b/invokeai/frontend/web/src/features/controlLayers/components/StagingArea/state.test.ts @@ -707,10 +707,9 @@ describe('StagingAreaApi', () => { // Should end up with the last set of items expect(api.$items.get()).toBe(items2); - // The selectedItemId retains the old value (1) but $selectedItem will be null - // because item 1 is no longer in the items list - expect(api.$selectedItemId.get()).toBe(1); - expect(api.$selectedItem.get()).toBe(null); + // We expect the selection to have moved to the next existent item + expect(api.$selectedItemId.get()).toBe(2); + expect(api.$selectedItem.get()?.item.item_id).toBe(2); }); it('should handle multiple progress events for same item', () => {