import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";

import { TokenizerPlaygroundEmbed } from "~/components/labs/TokenizerPlaygroundEmbed";

describe("TokenizerPlaygroundEmbed", () => {
  it("renders the iframe wrapper and fallback link", () => {
    render(<TokenizerPlaygroundEmbed />);

    expect(screen.getByTitle("Tokenizer playground")).toHaveAttribute(
      "src",
      "https://xenova-the-tokenizer-playground.static.hf.space",
    );
    expect(screen.getByRole("link", { name: "Open in New Tab" })).toHaveAttribute(
      "href",
      "https://xenova-the-tokenizer-playground.static.hf.space",
    );
  });
});
