Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Mock tabbable
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 committed Sep 15, 2023
1 parent 28cf1e7 commit 6f32c74
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 16 additions & 0 deletions __mocks__/tabbable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// https://github.com/focus-trap/tabbable#testing-in-jsdom
const lib = jest.requireActual("tabbable");

const tabbable = {
...lib,
tabbable: (node, options) =>
lib.tabbable(node, { ...options, displayCheck: "none" }),
focusable: (node, options) =>
lib.focusable(node, { ...options, displayCheck: "none" }),
isFocusable: (node, options) =>
lib.isFocusable(node, { ...options, displayCheck: "none" }),
isTabbable: (node, options) =>
lib.isTabbable(node, { ...options, displayCheck: "none" }),
};

module.exports = tabbable;
1 change: 0 additions & 1 deletion src/components/WelcomeModal/WelcomeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const WelcomeModal: React.FC<WelcomeModalProps> = ({
z-index: ${zIndex.max_do_not_use};
`}
size="large"
initialFocus=".slick-active"
>
{title && <CardTitle>{title}</CardTitle>}
<Carousel
Expand Down

0 comments on commit 6f32c74

Please sign in to comment.