import {render, screen} from "@testing-library/react";
import HistoryHeader from "../../HistoryHeader";
import MockAppWithProviders from "../../../../../../../../../../../mocks/AppWithProvider";

describe("HistoryHeader Component From call history", () => {
    describe("Rendering", () => {
        const tab = {
            phone_number: "09111111111"
        }
        it("text of header rendered", () => {
            render(<MockAppWithProviders><HistoryHeader tab={tab}/></MockAppWithProviders>);
            const textHeader = screen.queryByText(/تاریخچه تماس های/i);
            expect(textHeader).toBeInTheDocument();
        });
        it("caller number in header rendered", () => {
            render(<MockAppWithProviders><HistoryHeader tab={tab}/></MockAppWithProviders>);
            const callerNumber = screen.queryByText(/09111111111/i);
            expect(callerNumber).toBeInTheDocument();
        });
    });
});