From 245e9941c005a71e34934c598dc5f77303a8e3b6 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Fri, 22 Mar 2024 15:56:57 +0100 Subject: [PATCH] test(Input): add sizes --- test/components/Input.spec.ts | 7 +- .../__snapshots__/Input.spec.ts.snap | 77 +++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/test/components/Input.spec.ts b/test/components/Input.spec.ts index 4317e2c9..8a96d746 100644 --- a/test/components/Input.spec.ts +++ b/test/components/Input.spec.ts @@ -18,7 +18,12 @@ describe('Input', () => { ['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 size', { props: { size: 'xs' as const } }], + ['with size 2xs', { props: { size: '2xs' as const } }], + ['with size xs', { props: { size: 'xs' as const } }], + ['with size sm', { props: { size: 'sm' as const } }], + ['with size md', { props: { size: 'md' as const } }], + ['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 } }] ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: any }) => { diff --git a/test/components/__snapshots__/Input.spec.ts.snap b/test/components/__snapshots__/Input.spec.ts.snap index 2e910264..0f073014 100644 --- a/test/components/__snapshots__/Input.spec.ts.snap +++ b/test/components/__snapshots__/Input.spec.ts.snap @@ -72,6 +72,13 @@ exports[`Input > renders with required correctly 1`] = ` " `; +exports[`Input > renders with size 2xs correctly 1`] = ` +"
+ + +
" +`; + exports[`Input > renders with size correctly 1`] = ` "
@@ -79,6 +86,76 @@ exports[`Input > renders with size correctly 1`] = `
" `; +exports[`Input > renders with size correctly 2`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size correctly 3`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size correctly 4`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size correctly 5`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size correctly 6`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size lg correctly 1`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size md correctly 1`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size sm correctly 1`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size xl correctly 1`] = ` +"
+ + +
" +`; + +exports[`Input > renders with size xs correctly 1`] = ` +"
+ + +
" +`; + exports[`Input > renders with trailing and icon correctly 1`] = ` "