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

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

describe("Call Tab Details from Call Tan List", () => {
    describe("Rendering", () => {
        it('Should see the date on tab detail', async () => {
            render(
                <MockAppWithProviders>
                    <CallTabTime realTimeDate = {tab.date}/>
                </MockAppWithProviders>
            )

            await waitFor(() => {
                expect(screen.getByText(/ثانیه پیش/i)).toBeInTheDocument()
            })
        });
    })
})