diff --git a/src/components/common/WorkflowActionsList.test.ts b/src/components/common/WorkflowActionsList.test.ts index 67c668fe7d..e5483c65a0 100644 --- a/src/components/common/WorkflowActionsList.test.ts +++ b/src/components/common/WorkflowActionsList.test.ts @@ -70,6 +70,24 @@ describe('WorkflowActionsList', () => { expect(wrapper.text()).toContain('NEW') }) + it('does not render items with visible set to false', () => { + const items: WorkflowMenuItem[] = [ + { + id: 'hidden', + label: 'Hidden Item', + icon: 'pi pi-eye-slash', + command: vi.fn(), + visible: false + }, + { id: 'shown', label: 'Shown Item', icon: 'pi pi-eye', command: vi.fn() } + ] + + const wrapper = createWrapper(items) + + expect(wrapper.text()).not.toContain('Hidden Item') + expect(wrapper.text()).toContain('Shown Item') + }) + it('does not render badge when absent', () => { const items: WorkflowMenuAction[] = [ { id: 'plain', label: 'Plain', icon: 'pi pi-check', command: vi.fn() } diff --git a/src/components/common/WorkflowActionsList.vue b/src/components/common/WorkflowActionsList.vue index 09cee3aebd..670145f481 100644 --- a/src/components/common/WorkflowActionsList.vue +++ b/src/components/common/WorkflowActionsList.vue @@ -26,7 +26,7 @@ const { />