diff --git a/packages/editor-ui/src/components/MainHeader/MainHeader.vue b/packages/editor-ui/src/components/MainHeader/MainHeader.vue
index 53eb1fd634..c0e7068140 100644
--- a/packages/editor-ui/src/components/MainHeader/MainHeader.vue
+++ b/packages/editor-ui/src/components/MainHeader/MainHeader.vue
@@ -6,8 +6,8 @@
diff --git a/packages/editor-ui/src/components/MainHeader/TabBar.spec.ts b/packages/editor-ui/src/components/MainHeader/TabBar.spec.ts
new file mode 100644
index 0000000000..2d05ed572f
--- /dev/null
+++ b/packages/editor-ui/src/components/MainHeader/TabBar.spec.ts
@@ -0,0 +1,57 @@
+import { fireEvent } from '@testing-library/vue';
+import { createComponentRenderer } from '@/__tests__/render';
+import TabBar from '@/components/MainHeader/TabBar.vue';
+
+const renderComponent = createComponentRenderer(TabBar);
+
+describe('TabBar', () => {
+ const items = [
+ { name: 'Workflow', value: 'workflow' },
+ { name: 'Executions', value: 'executions' },
+ ];
+
+ it('should render the correct number of tabs', async () => {
+ const { findAllByRole } = renderComponent({
+ props: {
+ items,
+ modelValue: 'workflow',
+ },
+ });
+
+ const tabs = await findAllByRole('radio');
+ expect(tabs.length).toBe(2);
+ });
+
+ it('should emit update:modelValue event when a tab is clicked', async () => {
+ const { findAllByRole, emitted } = renderComponent({
+ props: {
+ items,
+ modelValue: 'workflow',
+ },
+ });
+
+ const tabs = await findAllByRole('radio');
+ const executionsTab = tabs[1];
+
+ await fireEvent.click(executionsTab);
+
+ expect(emitted()).toHaveProperty('update:modelValue');
+ });
+
+ it('should update the active tab when modelValue prop changes', async () => {
+ const { findAllByRole, rerender } = renderComponent({
+ props: {
+ items,
+ modelValue: 'workflow',
+ },
+ });
+
+ await rerender({ modelValue: 'executions' });
+
+ const tabs = await findAllByRole('radio');
+ const executionsTab = tabs[1];
+ const executionsTabButton = executionsTab.querySelector('.button');
+
+ expect(executionsTabButton).toHaveClass('active');
+ });
+});
diff --git a/packages/editor-ui/src/components/MainHeader/TabBar.vue b/packages/editor-ui/src/components/MainHeader/TabBar.vue
index b0dc486441..1b11891aa4 100644
--- a/packages/editor-ui/src/components/MainHeader/TabBar.vue
+++ b/packages/editor-ui/src/components/MainHeader/TabBar.vue
@@ -4,50 +4,35 @@
:class="{
[$style.container]: true,
['tab-bar-container']: true,
- [$style.menuCollapsed]: mainSidebarCollapsed,
}"
>
-
+
-