Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import "@testing-library/jest-dom";
|
||||
import { fireEvent, render, screen } from "@testing-library/react";
|
||||
import { MemoryRouter } from "react-router";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { HoverEffect } from "./HoverEffect";
|
||||
|
||||
describe("HoverEffect accessibility", () => {
|
||||
it("names image preview and modal external-link controls by action", async () => {
|
||||
render(
|
||||
<MemoryRouter>
|
||||
<HoverEffect
|
||||
items={[
|
||||
{
|
||||
name: "Analytics",
|
||||
description: "View reporting snapshots.",
|
||||
img: "/analytics.png",
|
||||
link: {
|
||||
href: "/analytics",
|
||||
},
|
||||
subFeatures: [{ name: "Reports" }],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByRole("button", { name: "preview image for Analytics" }));
|
||||
|
||||
const externalLink = await screen.findByRole("link", { name: "open Analytics" });
|
||||
expect(externalLink).toHaveAttribute("href", "/analytics");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user