From 94e9a1be5ec8ed56aabab335b4867903161c60b8 Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Fri, 19 Jul 2024 12:07:56 +0200 Subject: [PATCH] fix: correctly apply styles to `` icon diff --git a/packages/components/src/Select/Select.test.tsx b/packages/components/src/Select/Select.test.tsx index 3191dd28fb..7158541654 100644 --- a/packages/components/src/Select/Select.test.tsx +++ b/packages/components/src/Select/Select.test.tsx @@ -60,7 +60,7 @@ const theme: Theme = { size: { small: 'text-sm' }, }, }), - icon: cva(), + icon: cva('text-zinc-600'), }, Underlay: cva(), ListBox: { @@ -407,6 +407,23 @@ test('supports styling classnames with variants and sizes from theme', () => { expect(button.className).toContain('text-sm'); }); +test('supports applying styles to the caret icon', () => { + render( + + ); + + const button = screen.getByRole('button'); + // eslint-disable-next-line testing-library/no-node-access + const icon = button.querySelector('svg'); + + expect(icon).toHaveClass('text-zinc-600'); +}); + test('set width via props', () => { render(