Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

test(gallery): cover followed-tile precedence and fix merged adapter mock

Josh Corbett90c10aad6405
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx
index 4e9e59fa11..5927130a61 100644
--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx
@@ -1497,7 +1497,10 @@ describe('shared gallery progress section', () => {
currentLiveFollowEnabled = true;
currentPinnedSessionId = 'run:2';
setStrip([starred]);
- await renderGallery(createGallery({ items: [regular], selectedItemKey: null, selectedItemKeys: [] }));
+ // A saved selection is still there while following live; the followed tile is the cursor, not it.
+ await renderGallery(
+ createGallery({ items: [regular], selectedItemKey: 'image:regular.png', selectedItemKeys: ['image:regular.png'] })
+ );
// Down from the second tile lands on the strip's only cell; right steps off the tiles into it too.
registeredCommands.get('gallery.galleryNavDown')?.();
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSearch.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSearch.browser.test.tsx
index ba77d1f6d3..a8c621824f 100644
--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSearch.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryItemSearch.browser.test.tsx
@@ -72,6 +72,7 @@ const adapter: GalleryUiAdapter = {
liveFollowEnabled: false,
progressSessions: [],
pinnedProgressSessionId: null,
+ followedProgressSessionId: null,
followProgressSession: noop,
notifications: { add: notificationsAdd, reportError: noop },
projectId: 'project-1',
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx
index 0912db860e..8d77936aa4 100644
--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx
+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx
@@ -228,7 +228,6 @@ const GalleryProgressTile = ({
<chakra.button
ref={buttonRef}
type="button"
- data-progress-tile
focusVisibleRing="inside"
aria-label={`${label} · ${status}`}
aria-pressed={selected && session.state !== 'queued'}