mirror of
https://github.com/apache/superset.git
synced 2026-05-12 03:15:55 +00:00
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:
committed by
GitHub
parent
85e330e94b
commit
1a1322d3d9
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user