UNPKG

443 BTypeScriptView Raw
1import React from "react";
2
3import { render, screen } from "@/test/render";
4import { user } from "@/test/user";
5
6import { TestCase1567 } from "./Testcase1567";
7
8beforeEach(async () => {
9 render(<TestCase1567 />);
10 await user.tab();
11 await user.tab();
12 await user.tab();
13 await user.tab();
14});
15
16test("the button should have focus", () => {
17 expect(
18 screen.getByRole("button", { name: "I should be focusable" })
19 ).toHaveFocus();
20});