mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
show edit modal on dashboards list view (#9211)
* show edit modal on dashboards list view * lint * fix test * simplify PropertiesModal interface * lint * comply with method ordering * fix type issue
This commit is contained in:
committed by
GitHub
parent
d7ea41a529
commit
46598830e9
@@ -24,6 +24,7 @@ import fetchMock from 'fetch-mock';
|
||||
|
||||
import DashboardList from 'src/views/dashboardList/DashboardList';
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
import PropertiesModal from 'src/dashboard/components/PropertiesModal';
|
||||
|
||||
// store needed for withToasts(DashboardTable)
|
||||
const mockStore = configureStore([thunk]);
|
||||
@@ -93,4 +94,13 @@ describe('DashboardList', () => {
|
||||
`"/http//localhost/api/v1/dashboard/?q={%22order_column%22:%22changed_on%22,%22order_direction%22:%22desc%22,%22page%22:0,%22page_size%22:25}"`,
|
||||
);
|
||||
});
|
||||
|
||||
it('edits', async () => {
|
||||
expect(wrapper.find(PropertiesModal)).toHaveLength(0);
|
||||
wrapper
|
||||
.find('.fa-pencil')
|
||||
.first()
|
||||
.simulate('click');
|
||||
expect(wrapper.find(PropertiesModal)).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user