import { render } from '@testing-library/vue';
import { describe, expect, test, beforeEach, afterEach, vi } from 'vitest';
import UiSidebarContent from '../UiSidebarContent.vue';
import {
  createSidebarShell,
  mockMatchMediaDesktop,
} from './sidebar-test-helpers';

beforeEach(() => mockMatchMediaDesktop());
afterEach(() => vi.restoreAllMocks());

describe('UiSidebarContent', () => {
  test('forwards to core SidebarContent with data-sidebar', () => {
    const { container } = render(
      createSidebarShell('<UiSidebarContent data-testid="c" />', {
        UiSidebarContent,
      }),
    );
    expect(container.querySelector('[data-testid="c"]')).toHaveAttribute(
      'data-sidebar',
      'content',
    );
  });
});
