mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
59 lines
1.2 KiB
TypeScript
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();
|
|
});
|
|
});
|
|
});
|