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

const reducer = (state = {}, action) => {
    return { ...action, ...state };
};
const store = createStore(reducer, {});

describe('Modules/Designer/Components/CloseGraphicsEditorButton', () => {
    it('rendered component contains the custom-css-open-editor-button class', () => {
        const wrapper = mount(
            <Provider store={store}>
                <DefaultThemeProvider>
                    <CloseGraphicsEditorButton />
                </DefaultThemeProvider>
            </Provider>
        );
        expect(wrapper.find('button.custom-css-open-editor-button')).toHaveLength(1);
    });
});
