From 9df0e9b1ddb1c92ebc7b32281b7e82b568feb71f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=B8=E5=B0=98?= Date: Thu, 21 May 2026 14:24:25 +0800 Subject: [PATCH] Update HomeHero rail folder shortcut tests --- apps/web/tests/components/HomeHero.rail.test.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/tests/components/HomeHero.rail.test.tsx b/apps/web/tests/components/HomeHero.rail.test.tsx index 36bf6eb2a..266c1ef4b 100644 --- a/apps/web/tests/components/HomeHero.rail.test.tsx +++ b/apps/web/tests/components/HomeHero.rail.test.tsx @@ -400,11 +400,10 @@ describe('HomeHero intent rail', () => { .closest('[data-rail-group]'); expect(createPluginGroup?.getAttribute('data-rail-group')).toBe('migrate'); - for (const id of ['figma', 'template']) { + for (const id of ['figma', 'folder', 'template']) { expect(screen.getByTestId(`home-hero-rail-${id}`).closest('[data-rail-group]')) .toBe(createPluginGroup); } - expect(screen.queryByTestId('home-hero-rail-folder')).toBeNull(); }); it('keeps the generic fallback in the free-form prompt instead of an Other chip', () => { @@ -417,7 +416,7 @@ describe('HomeHero intent rail', () => { it('migration chips carry the right action discriminator', () => { expect(findChip('create-plugin')?.action).toMatchObject({ kind: 'create-plugin' }); expect(findChip('figma')?.action).toMatchObject({ kind: 'apply-figma-migration' }); - expect(findChip('folder')).toBeUndefined(); + expect(findChip('folder')?.action).toMatchObject({ kind: 'import-folder' }); expect(findChip('template')?.action).toMatchObject({ kind: 'open-template-picker' }); });