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 unit testing a component of mine that uses antd dropdown.
I get this error when trying to use enzyme to mount the component and then simulate a click on that drop down.
The above error occurred in the <Align> component:
in Align (created by Popup)
in AnimateChild (created by Animate)
in Animate (created by Popup)
in div (created by Popup)
in Popup (created by Trigger)
in Portal (created by Trigger)
in Trigger (created by Dropdown)
in Dropdown (created by Dropdown)
TypeError: getComputedStyleX is not a function
at getWH (node_modules/dom-align/lib/utils.js:434:23)
at HTMLAnchorElement.<anonymous> (node_modules/dom-align/lib/utils.js:486:19)
at swap (node_modules/dom-align/lib/utils.js:359:12)
at getWHIgnoreDisplay (node_modules/dom-align/lib/utils.js:485:5)
at Object.domUtils.(anonymous function) [as outerWidth] (node_modules/dom-
align/lib/utils.js:495:18)
at getRegion (node_modules/dom-align/lib/getRegion.js:19:28)
at alignElement (node_modules/dom-align/lib/align/alignElement.js:34:50)
at Align._this.forceAlign (node_modules/rc-align/lib/Align.js:76:47)
at Align.componentDidMount (node_modules/rc-align/lib/Align.js:91:10)
at commitLifeCycles (node_modules/react-dom/cjs/react-dom.development.js:14362:22)
I definitely do have a window defined.
console.log(".....", window.getComputedStyle);
let wrapper = mount(<UserMenu />);
wrapper.find(Dropdown).simulate('click')
The text was updated successfully, but these errors were encountered:
I'm unit testing a component of mine that uses antd dropdown.
I get this error when trying to use enzyme to mount the component and then simulate a click on that drop down.
I definitely do have a window defined.
The text was updated successfully, but these errors were encountered: