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

describe("ReactiveCanvasDisplay (stub)", () => {
  it("renders a placeholder card with the given label", () => {
    const wrapper = mount(ReactiveCanvasDisplay, {
      props: { label: "Live demo" },
    })
    expect(wrapper.text()).toContain("Coming soon")
    expect(wrapper.text()).toContain("Live demo")
    expect(wrapper.find("[data-testid='reactive-canvas-display']").exists()).toBe(true)
  })

  it("falls back to a default label", () => {
    const wrapper = mount(ReactiveCanvasDisplay)
    expect(wrapper.text()).toContain("Reactive Canvas")
  })

  it("applies classList to the root", () => {
    const wrapper = mount(ReactiveCanvasDisplay, {
      props: { classList: "stub-class" },
    })
    expect(wrapper.attributes("class")).toContain("stub-class")
  })
})
