1 | import React from "react";
|
2 |
|
3 | import { dateButton, gridcell } from "@/test/elements";
|
4 | import { render } from "@/test/render";
|
5 | import { user } from "@/test/user";
|
6 |
|
7 | import { TestCase2047 } from "./TestCase2047";
|
8 |
|
9 | beforeEach(async () => {
|
10 | render(<TestCase2047 />);
|
11 | });
|
12 |
|
13 | test("disabled date is not selected", () => {
|
14 | expect(gridcell(new Date(2024, 5, 10), true)).not.toHaveAttribute(
|
15 | "aria-selected"
|
16 | );
|
17 | });
|
18 |
|
19 | describe("when the calendar is focused", () => {
|
20 | beforeEach(async () => {
|
21 | await user.click(dateButton(new Date(2024, 5, 10)));
|
22 | });
|
23 | test("the disabled day should not have focused modifier", () => {
|
24 | expect(gridcell(new Date(2024, 5, 10), true)).not.toHaveClass(
|
25 | "rdp-focused"
|
26 | );
|
27 | });
|
28 | });
|