import {render, screen, waitFor} from "@testing-library/react";
import MockAppWithProviders from "../../../../../../../../../mocks/AppWithProvider";
import CallTabDetails
    from "@/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabsList/CallTabDetails";


const tab = {
    phone_number: "09134849737",
    id: 1,
    date: new Date()
}

describe("Call Tab Details from Call Tan List", () => {
    describe("Rendering", () => {
        it('Should see the phone number on tab detail', async () => {
            render(
                <MockAppWithProviders>
                    <CallTabDetails tab = {tab}/>
                </MockAppWithProviders>
            )
            const phoneNumberElement = screen.getByText("09134849737")
            await waitFor(() => {
                expect(phoneNumberElement).toHaveTextContent("09134849737")
            })
        });

    })
})