import { AnswersProvider } from "@/lib/callWidget/contexts/answers";
import CallActionsSubcategories from "..";
import MockAppWithProviders from "../../../../../../../../../../../mocks/AppWithProvider";
import { render, screen, waitFor } from "@testing-library/react";

const tab = {
    active: true,
    active_category_id: 1,
    id : 1,
    phone_number : "09134849737"
}

describe('Call Action Categories Button from Call Actions Categories', () => {
    describe('Rendering', () => {
        it('should see divider text', async () => {
            render(
                <MockAppWithProviders>
                    <AnswersProvider>
                        <CallActionsSubcategories tab={tab}/>
                    </AnswersProvider>
                </MockAppWithProviders>
            )
            const divider_textElement = screen.queryByText("زیر موضوع ها")
            await waitFor(() => {
                expect(divider_textElement).toBeInTheDocument()
            })
        });
    });
})