mirror of
https://github.com/apache/superset.git
synced 2026-04-10 03:45:22 +00:00
* [superset-client][misc] replace ajax calls in DashboardTable, TableLoader, utils, common * [superset-client][misc] replace ajax calls in AsyncSelect, HeaderActions, Deck.gl * [superset-client][misc] fix tests * [superset-client] remove unneeded functional setState calls * [superset-client] make welcome a redux app for toasts * [superset-client] make Profile a redux app for toasts * [superset-client] TableLoader don't pass toast props to dom nodes * tweak deckgl Multi syntax
29 lines
881 B
JavaScript
29 lines
881 B
JavaScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import thunk from 'redux-thunk';
|
|
import configureStore from 'redux-mock-store';
|
|
|
|
import { user } from './fixtures';
|
|
import CreatedContent from '../../../src/profile/components/CreatedContent';
|
|
import TableLoader from '../../../src/components/TableLoader';
|
|
|
|
// store needed for withToasts(TableLoader)
|
|
const mockStore = configureStore([thunk]);
|
|
const store = mockStore({});
|
|
|
|
describe('CreatedContent', () => {
|
|
const mockedProps = {
|
|
user,
|
|
};
|
|
|
|
it('renders 2 TableLoader', () => {
|
|
const wrapper = shallow(<CreatedContent {...mockedProps} />, { context: { store } });
|
|
expect(wrapper.find(TableLoader)).toHaveLength(2);
|
|
});
|
|
|
|
it('renders 2 titles', () => {
|
|
const wrapper = shallow(<CreatedContent {...mockedProps} />, { context: { store } });
|
|
expect(wrapper.find('h3')).toHaveLength(2);
|
|
});
|
|
});
|