Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
// @vitest-environment jsdom
|
||||
|
||||
import "@testing-library/jest-dom/vitest";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Checkbox } from ".";
|
||||
|
||||
describe("Checkbox accessibility wrapper", () => {
|
||||
it("keeps a hidden string label as the checkbox accessible name", () => {
|
||||
render(<Checkbox hideLabel label="Accept privacy policy" />);
|
||||
|
||||
expect(screen.getByRole("checkbox", { name: "Accept privacy policy" })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("preserves an explicit accessible name", () => {
|
||||
render(<Checkbox hideLabel label="Privacy" aria-label="Accept privacy policy" />);
|
||||
|
||||
expect(screen.getByRole("checkbox", { name: "Accept privacy policy" })).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user