All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.widgets.Table.cells.ButtonsCell.tests.ButtonsCell.test.js Maven / Gradle / Ivy

The newest version!
import React from 'react'
import { mount } from 'enzyme'
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import sinon from 'sinon'

import ButtonsCell from '../ButtonsCell'
import FactoryProvider from '../../../../../../core/factory/FactoryProvider'
import createFactoryConfig from '../../../../../../core/factory/createFactoryConfig'

const mockStore = configureMockStore()
const store = mockStore({ models: { datasource: {}, resolve: {}, multi: {}, filter: {}, edit: {} } })

const setup = (propOverrides = {}) => {
    const props = { ...propOverrides }

    const wrapper = mount(
        
            
                
            
        ,
    )

    return {
        props,
        wrapper,
    }
}

describe('', () => {
    it('Проверяет создание Кнопки', () => {
        const { wrapper } = setup({
            toolbar: [
                {
                    buttons: [{ src: 'LinkButton', title: 'test' }],
                },
            ],
        })

        wrapper.update()
        expect(wrapper.find('Toolbar').exists()).toBeTruthy()
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy