import {fireEvent, render, screen, waitFor} from "@testing-library/react";
import MockAppWithProviders from "../../../../../../../mocks/AppWithProvider";
import DeleteForm from "@/components/dashboard/role-management/Form/DeleteForm";
import UpdateForm from "@/components/dashboard/role-management/Form/UpdateForm";

describe("Create Form Component from Role Management Component",()=> {
    describe("Rendering", () => {
        it('should see Dialog text when mouse is over', async () => {
            render(
                <MockAppWithProviders>
                    <DeleteForm />
                </MockAppWithProviders>
            )
            const textElement = screen.getByTestId("dialog_tooltip")
            fireEvent.mouseOver(textElement)
            await waitFor(()=>{
                expect(screen.getByText("حذف")).toBeInTheDocument();
            })
        });
    })
})