williaster commented on a change in pull request #5359: Upgrade to 
React==16.4.1 &  Enzyme==3.3.0
URL: 
https://github.com/apache/incubator-superset/pull/5359#discussion_r216449107
 
 

 ##########
 File path: 
superset/assets/spec/javascripts/explore/components/DateFilterControl_spec.jsx
 ##########
 @@ -19,53 +19,21 @@ const defaultProps = {
 
 describe('DateFilterControl', () => {
   let wrapper;
+  let popover;
 
   beforeEach(() => {
     wrapper = shallow(<DateFilterControl {...defaultProps} />);
+    popover = shallow(wrapper.instance().renderPopover());
   });
 
   it('renders a ControlHeader', () => {
     const controlHeader = wrapper.find(ControlHeader);
     expect(controlHeader).to.have.lengthOf(1);
   });
   it('renders 3 Buttons', () => {
-    const label = wrapper.find('.label').first();
-    label.simulate('click');
-    setTimeout(() => {
-      expect(wrapper.find(Button)).to.have.length(3);
-    }, 10);
+    expect(popover.find(Button)).to.have.length(1);
 
 Review comment:
   why is this 1 but the title says 3?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to