feat: one-click copy chart and dashboard URL (#13037)

Closes #10328
This commit is contained in:
Michael S. Molina
2021-02-17 19:14:08 -03:00
committed by GitHub
parent 91db008d72
commit ad4ca2223e
22 changed files with 422 additions and 344 deletions

View File

@@ -18,6 +18,7 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
import { mockStore } from 'spec/fixtures/mockStore';
import ExploreActionButtons from 'src/explore/components/ExploreActionButtons';
describe('ExploreActionButtons', () => {
@@ -35,8 +36,10 @@ describe('ExploreActionButtons', () => {
).toBe(true);
});
it('should render 5 children/buttons', () => {
const wrapper = shallow(<ExploreActionButtons {...defaultProps} />);
expect(wrapper.children()).toHaveLength(5);
it('should render 6 children/buttons', () => {
const wrapper = shallow(
<ExploreActionButtons {...defaultProps} store={mockStore} />,
);
expect(wrapper.dive().children()).toHaveLength(6);
});
});