michael-s-molina commented on code in PR #21576:
URL: https://github.com/apache/superset/pull/21576#discussion_r980087626


##########
superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx:
##########
@@ -202,4 +203,18 @@ describe('Tabs', () => {
     expect(modalMock.mock.calls).toHaveLength(1);
     expect(deleteComponent.callCount).toBe(0);
   });
+
+  if (
+    ('should set new tab key if dashboardId was changed',
+    () => {
+      const wrapper = shallow(<Tabs {...props} />);
+      expect(wrapper.state('activeKey')).toBe('TABS_ID');
+      wrapper.setProps({
+        ...props,
+        dashboardId: 2,
+        component: dashboardLayoutWithTabs.present.TAB_ID,
+      });
+      expect(wrapper.state('activeKey')).toBe('TAB_ID');
+    })
+  );

Review Comment:
   ```suggestion
     it('should set new tab key if dashboardId was changed', () => {
       const wrapper = shallow(<Tabs {...props} />);
       expect(wrapper.state('activeKey')).toBe('TABS_ID');
       wrapper.setProps({
         ...props,
         dashboardId: 2,
         component: dashboardLayoutWithTabs.present.TAB_ID,
       });
       expect(wrapper.state('activeKey')).toBe('TAB_ID');
     });
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to