import React from 'react';
import { mount } from 'enzyme';
import ProductPartsList from './index';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import DefaultThemeProvider from '../../../../Screens/Configurator/ThemeProvider';

const reducer = (state = {}, action) => {
    return { ...action, ...state };
};
const store = createStore(reducer, {
    i18n: {
        locale: 'en-GB',
    },
});

describe('ProductPartsList', () => {
    it('rendered component contains the custom-css-components class', () => {
        const wrapper = mount(
            <Provider store={store}>
                <DefaultThemeProvider>
                    <ProductPartsList />
                </DefaultThemeProvider>
            </Provider>
        );
        expect(wrapper.find('div.custom-css-components')).toHaveLength(1);
    });
});
