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

describe("Topics Component From call history", () => {
    describe("Rendering", () => {
        const historyItem = {
            category_name: "test category",
            subcategory_name: "test sub category"
        }
        it("operator name rendered", () => {
            render(<MockAppWithProviders><Topics historyItem={historyItem}/></MockAppWithProviders>);
            const operatorName = screen.queryByText("test category");
            expect(operatorName).toBeInTheDocument();
        });
        it("operator answer date rendered", () => {
            render(<MockAppWithProviders><Topics historyItem={historyItem}/></MockAppWithProviders>);
            const operatorAnswerDate = screen.queryByText("test sub category");
            expect(operatorAnswerDate).toBeInTheDocument();
        });
    });
});