fix(dashboard): Make the View Chart In Explore menu option a link (#15668)

* hey look, it's a real anchor tag!

* get the explore chart url into the link

* add doc comments to the functions

* remove pointless test

* update weird tests

Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
David Aaron Suddjian
2021-07-14 14:12:20 -07:00
committed by GitHub
parent 5d86b8dde6
commit 985af72ac3
6 changed files with 56 additions and 69 deletions

View File

@@ -193,18 +193,6 @@ test('Should not show export full CSV if report is not table', () => {
);
});
test('Should "View chart in Explore"', () => {
const props = createProps();
render(<SliceHeaderControls {...props} />, { useRedux: true });
expect(props.exploreChart).toBeCalledTimes(0);
userEvent.click(
screen.getByRole('menuitem', { name: 'View chart in Explore' }),
);
expect(props.exploreChart).toBeCalledTimes(1);
expect(props.exploreChart).toBeCalledWith(371);
});
test('Should "Toggle chart description"', () => {
const props = createProps();
render(<SliceHeaderControls {...props} />, { useRedux: true });