forked from baron/baron-sso
24 lines
628 B
TypeScript
24 lines
628 B
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import { describe, expect, it } from "vitest";
|
|
import {
|
|
Dialog,
|
|
DialogContent,
|
|
DialogDescription,
|
|
DialogTitle,
|
|
} from "./dialog";
|
|
|
|
describe("Dialog FocusScope integration", () => {
|
|
it("mounts an open dialog without a ref update loop", () => {
|
|
render(
|
|
<Dialog open>
|
|
<DialogContent>
|
|
<DialogTitle>Focus scope check</DialogTitle>
|
|
<DialogDescription>Dialog content is mounted.</DialogDescription>
|
|
</DialogContent>
|
|
</Dialog>,
|
|
);
|
|
|
|
expect(screen.getByText("Focus scope check")).toBeInTheDocument();
|
|
});
|
|
});
|