import '@testing-library/jest-dom/vitest';
import { render } from '@testing-library/vue';
import { describe, expect, test } from 'vitest';
import UiCardAction from '../UiCardAction.vue';

describe('UiCardAction', () => {
  test('renders with custom class', () => {
    const { container } = render(UiCardAction, {
      props: { class: 'custom-action' },
      slots: {
        default: '<button>Action</button>',
      },
    });

    const action = container.querySelector('[data-slot="card-action"]');
    expect(action).toBeInTheDocument();
    expect(action).toHaveClass('custom-action');
  });
});
