You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using Jest with Fluent UI Nortshar and i'm encountering some issues.
In my case i want to test the DropDown Component and it's different behaviors (open it, onChange).
I already tried to get button element to toggle dropdown in different way (getByTestId, document.querySelector ...)
I already tried to fireEvent with "fireEvent" from "react-dom/test-utils" and "userEvent" from "@testing-library/user-event"
I verified if there is another button in the dom, there is not
The error message that i encounter everytime is : "TypeError: Cannot read properties of undefined (reading 'activeElement')"
I want to test the click (to open dropdown) and the onChange behavior of FUI Northstar Dropdown Component.
If you want additional informations don't hesitate
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm currently using Jest with Fluent UI Nortshar and i'm encountering some issues.
In my case i want to test the DropDown Component and it's different behaviors (open it, onChange).
I test a lot of way to reach it but no one work.
// CONFIGURATION //
package.json :
setupTest.ts :
babel.config.js :
jest.config.js:
// CODE //
Configure.tsx
Configure.logic.tsx
// TEST //
Configure.test.tsx:
I already tried to get button element to toggle dropdown in different way (getByTestId, document.querySelector ...)
I already tried to fireEvent with "fireEvent" from "react-dom/test-utils" and "userEvent" from "@testing-library/user-event"
I verified if there is another button in the dom, there is not
The error message that i encounter everytime is : "TypeError: Cannot read properties of undefined (reading 'activeElement')"
I want to test the click (to open dropdown) and the onChange behavior of FUI Northstar Dropdown Component.
If you want additional informations don't hesitate
Thanks for you answers.
Beta Was this translation helpful? Give feedback.
All reactions