feat(explore): Move chart actions into dropdown (#19446)

* feat(explore): Move chart actions to a dropdown menu

* Fix tests and add some new ones

* Add background color to embed code button

* Fix cypress tests

* Move copy permalink to actions menu

* Remove unused function

* Move share by email above embed code

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test
This commit is contained in:
Kamil Gabryjelski
2022-03-31 20:41:15 +02:00
committed by GitHub
parent 85e330e94b
commit 1a1322d3d9
16 changed files with 908 additions and 854 deletions

View File

@@ -96,14 +96,11 @@ const createProps = () => ({
test('Cancelling changes to the properties should reset previous properties', () => {
const props = createProps();
render(<ExploreHeader {...props} />, { useRedux: true });
const openModal = screen.getByRole('button', {
name: 'Edit chart properties',
});
const newChartName = 'New chart name';
const prevChartName = props.slice_name;
userEvent.click(openModal);
userEvent.click(screen.getByLabelText('Menu actions trigger'));
userEvent.click(screen.getByText('Edit chart properties'));
const nameInput = screen.getByRole('textbox', { name: 'Name' });
@@ -114,7 +111,8 @@ test('Cancelling changes to the properties should reset previous properties', ()
userEvent.click(screen.getByRole('button', { name: 'Cancel' }));
userEvent.click(openModal);
userEvent.click(screen.getByLabelText('Menu actions trigger'));
userEvent.click(screen.getByText('Edit chart properties'));
expect(screen.getByDisplayValue(prevChartName)).toBeInTheDocument();
});