Skip to content

Commit 28a63f6

Browse files
committed
fixup! feat: allow to customize icons in contributed actions
Signed-off-by: Florent Benoit <[email protected]>
1 parent e6a9f40 commit 28a63f6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/renderer/src/lib/actions/ContributionActions.spec.ts

+19
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,25 @@ test('Expect when property to be true multiple args', async () => {
228228
expect(item).toBeInTheDocument();
229229
});
230230

231+
test('Expect default icon if no custom icon', async () => {
232+
render(ContributionActions, {
233+
args: [],
234+
contributions: [
235+
{
236+
command: 'dummy.command',
237+
title: 'dummy-title',
238+
},
239+
],
240+
onError: () => {},
241+
dropdownMenu: true,
242+
});
243+
244+
const iconItem = screen.getByRole('img', { name: '', hidden: true });
245+
expect(iconItem).toBeInTheDocument();
246+
// expect to have the svelte-fa class
247+
expect(iconItem).toHaveClass('svelte-fa');
248+
});
249+
231250
test('Expect custom icon on the contributed action', async () => {
232251
render(ContributionActions, {
233252
args: [],

0 commit comments

Comments
 (0)