You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/09/10 19:06:15 UTC

[GitHub] [incubator-superset] kristw commented on a change in pull request #8173: feat: read control panel configs from registry

kristw commented on a change in pull request #8173: feat: read control panel configs from registry
URL: https://github.com/apache/incubator-superset/pull/8173#discussion_r322912939
 
 

 ##########
 File path: superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx
 ##########
 @@ -45,12 +46,12 @@ describe('ControlPanelsContainer', () => {
 
   it('renders ControlPanelSections', () => {
     wrapper = shallow(<ControlPanelsContainer {...defaultProps} />);
-    expect(wrapper.find(ControlPanelSection)).toHaveLength(6);
+    expect(wrapper.find(ControlPanelSection)).toHaveLength(2);
 
 Review comment:
   Nope, this is because the old code expected control panel for `table` to be registered. 
   `table` has 4 sections of control + default 2 sections = 6
   when using `SCOPED_FILTER`, it adds another section so it became 7. 
   
   With the update in this PR to delegate the registration of control panels to during setup, the unit tests did not register control panel for table, so it misses the 4 sections.
   Anyway, I updated the unit test to register the control panel config for table, so the unit tests will keep the name numbers.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org