import { describe, it, expect } from 'vitest'
import { render } from '@testing-library/react'
import { Content, Footer } from './widget-content'

describe('<Content>', () => {
  it('renders children inside a data-slot=content box', () => {
    const { getByText, container } = render(
      <Content>
        <span>body</span>
      </Content>,
    )
    expect(getByText('body')).toBeTruthy()
    expect(container.querySelector('[data-slot="content"]')).not.toBeNull()
  })
})

describe('<Footer>', () => {
  it('renders children inside a data-slot=footer box', () => {
    const { getByText, container } = render(
      <Footer>
        <span>foot</span>
      </Footer>,
    )
    expect(getByText('foot')).toBeTruthy()
    expect(container.querySelector('[data-slot="footer"]')).not.toBeNull()
  })
})
