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()
})
})