-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/npm_and_yarn/prettier-3.3.2
- Loading branch information
Showing
63 changed files
with
240 additions
and
1,118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,24 @@ | ||
import React from "react"; | ||
|
||
import { activeElement, gridcell } from "@/test/elements"; | ||
import { act, render } from "@/test/render"; | ||
import { render } from "@/test/render"; | ||
import { user } from "@/test/user"; | ||
|
||
import { FocusRecursive } from "./FocusRecursive"; | ||
|
||
const today = new Date(2022, 5, 10); | ||
|
||
beforeAll(() => { | ||
jest.setSystemTime(today); | ||
}); | ||
|
||
afterAll(() => { | ||
jest.useRealTimers(); | ||
}); | ||
beforeAll(() => jest.setSystemTime(today)); | ||
afterAll(() => jest.useRealTimers()); | ||
|
||
test("the first selected day should have focus", async () => { | ||
render(<FocusRecursive />).container; | ||
await act(() => user.tab()); | ||
await act(() => user.tab()); | ||
await act(() => user.tab()); | ||
await act(() => user.type(activeElement(), "{arrowdown}")); | ||
await act(() => user.type(activeElement(), "{arrowdown}")); | ||
await act(() => user.type(activeElement(), "{arrowdown}")); | ||
await act(() => user.type(activeElement(), "{arrowdown}")); | ||
await user.tab(); | ||
await user.tab(); | ||
await user.tab(); | ||
await user.type(activeElement(), "{arrowdown}"); | ||
await user.type(activeElement(), "{arrowdown}"); | ||
await user.type(activeElement(), "{arrowdown}"); | ||
await user.type(activeElement(), "{arrowdown}"); | ||
expect(gridcell(new Date(2022, 5, 22))).toHaveFocus(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
import React from "react"; | ||
|
||
import { render, screen } from "@/test/render"; | ||
import { grid } from "@/test/elements"; | ||
import { render } from "@/test/render"; | ||
|
||
import { Jalali } from "./Jalali"; | ||
|
||
const today = new Date(2021, 10, 25); | ||
const today = new Date(1403, 10, 25); | ||
|
||
beforeAll(() => { | ||
jest.setSystemTime(today); | ||
}); | ||
|
||
afterAll(() => { | ||
jest.useRealTimers(); | ||
}); | ||
|
||
beforeEach(() => { | ||
render( | ||
<div role="application"> | ||
<Jalali /> | ||
</div> | ||
); | ||
}); | ||
beforeAll(() => jest.setSystemTime(today)); | ||
afterAll(() => jest.useRealTimers()); | ||
|
||
test("should match the snapshot", () => { | ||
expect(screen.getByRole("application")).toMatchSnapshot(); | ||
test("should render نوامبر 1403", () => { | ||
render(<Jalali />); | ||
expect(grid("نوامبر 1403")).toBeInTheDocument(); | ||
}); |
Oops, something went wrong.