diff --git a/test/components/Input.spec.ts b/test/components/Input.spec.ts index 636b7c33..5793a616 100644 --- a/test/components/Input.spec.ts +++ b/test/components/Input.spec.ts @@ -14,11 +14,10 @@ describe('Input', () => { ['with icon', { props: { icon: 'i-heroicons-magnifying-glass' } }], ['with leading and icon', { props: { leading: true, icon: 'i-heroicons-magnifying-glass' } }], ['with leadingIcon', { props: { leadingIcon: 'i-heroicons-magnifying-glass' } }], - ['with loading icon', { props: { loading: true } }], - ['with leading slot', { slots: { leading: () => 'leading slot' } }], ['with trailing and icon', { props: { trailing: true, icon: 'i-heroicons-magnifying-glass' } }], ['with trailingIcon', { props: { trailingIcon: 'i-heroicons-magnifying-glass' } }], - ['with trailing slot', { slots: { leading: () => 'trailing slot' } }], + ['with loading', { props: { loading: true } }], + ['with loadingIcon', { props: { loading: true, loadingIcon: 'i-heroicons-sparkles' } }], ['with size 2xs', { props: { size: '2xs' as const } }], ['with size xs', { props: { size: 'xs' as const } }], ['with size sm', { props: { size: 'sm' as const } }], @@ -26,7 +25,10 @@ describe('Input', () => { ['with size lg', { props: { size: 'lg' as const } }], ['with size xl', { props: { size: 'xl' as const } }], ['with color', { props: { color: 'red' as const } }], - ['with variant', { props: { variant: 'outline' as const } }] + ['with variant', { props: { variant: 'outline' as const } }], + ['with default slot', { slots: { default: () => 'Default slot' } }], + ['with leading slot', { slots: { leading: () => 'Leading slot' } }], + ['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }] ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: any }) => { const html = await ComponentRender(nameOrHtml, options, Input) expect(html).toMatchSnapshot() diff --git a/test/components/__snapshots__/Input.spec.ts.snap b/test/components/__snapshots__/Input.spec.ts.snap index 0acd0c7b..b46e1cee 100644 --- a/test/components/__snapshots__/Input.spec.ts.snap +++ b/test/components/__snapshots__/Input.spec.ts.snap @@ -14,6 +14,13 @@ exports[`Input > renders with color correctly 1`] = ` " `; +exports[`Input > renders with default slot correctly 1`] = ` +"