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.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
test(ui): honest starter base-sort coverage
Josh Corbettc4e05b1475cd
diff --git a/invokeai/frontend/webv2/src/features/models/core/starters.test.ts b/invokeai/frontend/webv2/src/features/models/core/starters.test.tsindex b1d1f3347b..6b0c7384fb 100644--- a/invokeai/frontend/webv2/src/features/models/core/starters.test.ts+++ b/invokeai/frontend/webv2/src/features/models/core/starters.test.ts@@ -63,12 +63,24 @@ describe('filterStarterModels', () => {]);});- it('sorts by base label, not raw base id', () => {- // Labels: FLUX, SD 1.x, SDXL — alphabetical by label.+ it('sorts by base', () => {+ // Note: label order and raw-id order coincide for every registry base, so+ // this cannot distinguish the two — it pins the ordering, not the source.expect(filterStarterModels(catalog, { ...DEFAULT_STARTER_MODEL_FILTERS, sortField: 'base' as const }, '').map((m) => m.base)).toEqual(['flux', 'sd-1', 'sdxl']);});++ it('sorts unknown bases deterministically via their fallback labels', () => {+ // 'zeta-arch' has no registry entry; its display label is "Zeta Arch".+ const withUnknown = [...catalog, createStarter({ base: 'zeta-arch', name: 'Zeta Model' })];++ expect(+ filterStarterModels(withUnknown, { ...DEFAULT_STARTER_MODEL_FILTERS, sortField: 'base' as const }, '').map(+ (m) => m.base+ )+ ).toEqual(['flux', 'sd-1', 'sdxl', 'zeta-arch']);+ });});