Files
n8n-enterprise-unlocked/packages/frontend/@n8n/design-system/src/components/N8nActionDropdown/ActionDropdown.test.ts
Alex Grozav ed2cb3c701 feat(editor): Update icons to Lucide icons (#16231)
Co-authored-by: Mutasem Aldmour <mutasem@n8n.io>
2025-06-30 17:11:09 +02:00

59 lines
1.2 KiB
TypeScript

import { render } from '@testing-library/vue';
import N8nActionDropdown from './ActionDropdown.vue';
describe('components', () => {
describe('N8nActionDropdown', () => {
it('should render default styling correctly', () => {
const wrapper = render(N8nActionDropdown, {
props: {
items: [
{
id: 'item1',
label: 'Action 1',
},
{
id: 'item2',
label: 'Action 2',
},
],
},
global: {
stubs: ['n8n-icon', 'el-tooltip', 'el-dropdown', 'el-dropdown-menu', 'el-dropdown-item'],
},
});
expect(wrapper.html()).toMatchSnapshot();
});
it('should render custom styling correctly', () => {
const wrapper = render(N8nActionDropdown, {
props: {
items: [
{
id: 'item1',
label: 'Action 1',
icon: 'thumbs-up',
},
{
id: 'item2',
label: 'Action 2',
icon: 'thumbs-down',
disabled: true,
},
{
id: 'item3',
label: 'Action 3',
icon: 'house',
divided: true,
},
],
},
global: {
stubs: ['n8n-icon', 'el-dropdown', 'el-dropdown-menu', 'el-dropdown-item'],
},
});
expect(wrapper.html()).toMatchSnapshot();
});
});
});