mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
style: listviews closer to SIP-34 (#10094)
This commit is contained in:
@@ -19,13 +19,14 @@
|
||||
import React from 'react';
|
||||
import { mount, shallow } from 'enzyme';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { MenuItem, Pagination } from 'react-bootstrap';
|
||||
import { MenuItem } from 'react-bootstrap';
|
||||
import Select from 'src/components/Select';
|
||||
import { QueryParamProvider } from 'use-query-params';
|
||||
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
import ListViewFilters from 'src/components/ListView/Filters';
|
||||
import ListViewPagination from 'src/components/ListView/Pagination';
|
||||
import Pagination from 'src/components/Pagination';
|
||||
import { areArraysShallowEqual } from 'src/reduxUtils';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
|
||||
@@ -21,6 +21,8 @@ import { mount } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
|
||||
import ChartList from 'src/views/chartList/ChartList';
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
@@ -77,6 +79,8 @@ describe('ChartList', () => {
|
||||
const mockedProps = {};
|
||||
const wrapper = mount(<ChartList {...mockedProps} />, {
|
||||
context: { store },
|
||||
wrappingComponent: ThemeProvider,
|
||||
wrappingComponentProps: { theme: supersetTheme },
|
||||
});
|
||||
|
||||
it('renders', () => {
|
||||
|
||||
@@ -21,6 +21,8 @@ import { mount } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
|
||||
import DashboardList from 'src/views/dashboardList/DashboardList';
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
@@ -67,6 +69,8 @@ describe('DashboardList', () => {
|
||||
const mockedProps = {};
|
||||
const wrapper = mount(<DashboardList {...mockedProps} />, {
|
||||
context: { store },
|
||||
wrappingComponent: ThemeProvider,
|
||||
wrappingComponentProps: { theme: supersetTheme },
|
||||
});
|
||||
|
||||
it('renders', () => {
|
||||
|
||||
@@ -21,6 +21,8 @@ import { mount } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
import DashboardTable from 'src/welcome/DashboardTable';
|
||||
@@ -36,7 +38,11 @@ fetchMock.get(dashboardsEndpoint, { result: mockDashboards });
|
||||
|
||||
function setup() {
|
||||
// use mount because data fetching is triggered on mount
|
||||
return mount(<DashboardTable />, { context: { store } });
|
||||
return mount(<DashboardTable />, {
|
||||
context: { store },
|
||||
wrappingComponent: ThemeProvider,
|
||||
wrappingComponentProps: { theme: supersetTheme },
|
||||
});
|
||||
}
|
||||
|
||||
describe('DashboardTable', () => {
|
||||
|
||||
Reference in New Issue
Block a user