import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { BrandButton } from "#/components/features/settings/brand-button";
describe("BrandButton", () => {
const onClickMock = vi.fn();
it("should set a test id", () => {
render(
Test Button
,
);
expect(screen.getByTestId("brand-button")).toBeInTheDocument();
});
it("should call onClick when clicked", async () => {
const user = userEvent.setup();
render(
Test Button
,
);
await user.click(screen.getByText("Test Button"));
});
it("should be disabled if isDisabled is true", () => {
render(
Test Button
,
);
expect(screen.getByText("Test Button")).toBeDisabled();
});
it("should pass a start content", () => {
render(
Start Content
}
>
Test Button
,
);
screen.getByTestId("custom-start-content");
});
});