import { render, screen, fireEvent } from "@testing-library/react"; import { describe, it, expect, vi } from "vitest"; import { ActionBanner } from "./ActionBanner.component"; describe("ActionBanner", () => { it("renders with default props", () => { render( {}}> Test Content ); expect(screen.getByText("Test Content")).toBeInTheDocument(); expect(screen.getByText("Click me")).toBeInTheDocument(); }); it("renders with custom props", () => { render( {}} className="custom-class" > Custom Content ); expect(screen.getByText("Custom Content")).toBeInTheDocument(); expect(screen.getByText("Submit")).toBeInTheDocument(); }); it("calls onPress when button is clicked", () => { const handlePress = vi.fn(); render( Test Content ); fireEvent.click(screen.getByText("Click me")); expect(handlePress).toHaveBeenCalledTimes(1); }); });