import { mount } from '@vue/test-utils'
import Dialog from '../Dialog.vue'
import { describe, it, expect } from 'vitest'

describe('Dialog.vue', () => {
    it('renders slot content when open', () => {
        const wrapper = mount(Dialog, {
            props: { modelValue: true },
            slots: { default: '<p data-test="content">Hello</p>' },
        })
        expect(wrapper.find('[data-test="content"]').exists()).toBe(true)
    })

    it('does not render when closed', () => {
        const wrapper = mount(Dialog, {
            props: { modelValue: false },
            slots: { default: '<p>Hidden</p>' },
        })
        // Should not render content
        expect(wrapper.html()).toBe('')
    })
}) 