(":scope > div[tabindex='0']");
+ expect(focusGuards).toHaveLength(2);
+
+ fireEvent.focus(focusGuards[0]!);
expect(document.activeElement).toEqual(closeAction);
- userEvent.tab();
+ fireEvent.focus(focusGuards[1]!);
expect(document.activeElement).toEqual(textarea);
});
- test("'display: none;', 'visibility: hidden;' and 'type = 'hidden'' elements are never autofocused", () => {
+ test("'display: none;', 'visibility: hidden;' and 'type = 'hidden'' elements are never autofocused", async () => {
+ const user = userEvent.setup({ delay: null });
// TODO: Solve this
// If we don't have an Onclick function, the Close Icon will be a instead of a