import { mount } from '@vue/test-utils'
import ListSection from '../ListSection.vue'

describe('ListSection', () => {
  it('renders provided slots', () => {
    const wrapper = mount(ListSection, {
      slots: {
        title: '<div data-test="title">Title</div>',
        subtitle: '<div data-test="subtitle">Subtitle</div>',
        filters: '<div data-test="filters">Filters</div>',
        actions: '<div data-test="actions">Actions</div>',
        default: '<div data-test="content">Content</div>',
        empty: '<div data-test="empty">Empty</div>',
        footer: '<div data-test="footer">Footer</div>'
      }
    })

    expect(wrapper.find('[data-test="title"]').text()).toBe('Title')
    expect(wrapper.find('[data-test="subtitle"]').text()).toBe('Subtitle')
    expect(wrapper.find('[data-test="filters"]').text()).toBe('Filters')
    expect(wrapper.find('[data-test="actions"]').text()).toBe('Actions')
    expect(wrapper.find('[data-test="content"]').text()).toBe('Content')
    expect(wrapper.find('[data-test="empty"]').text()).toBe('Empty')
    expect(wrapper.find('[data-test="footer"]').text()).toBe('Footer')
  })
})
