Skip to content

The open-source app everyone uses to manage agents at work

533 B
Raw Blame
// @vitest-environment node

import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { PriorityIcon } from "./PriorityIcon";

describe("PriorityIcon", () => {
  it("uses an accessible native button for the icon-only picker trigger", () => {
    const html = renderToStaticMarkup(<PriorityIcon priority="medium" onChange={() => {}} />);

    expect(html).toContain('<button type="button"');
    expect(html).toContain('aria-label="Change priority (current: Medium)"');
  });
});