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

components.controls.InputSelect.InputSelectContainer.test.js Maven / Gradle / Ivy

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

import InputSelectContainer from './InputSelectContainer'

const mockStore = configureMockStore()
const store = mockStore({ alerts: {} })

const props = {
    loading: false,
    value: '123',
    disabled: false,
    placeholder: 'vvv',
    valueFieldId: 'id',
    labelFieldId: 'id',
    filter: 'includes',
    resetOnBlur: false,
    disabledValues: [],
    queryId: 'options',
    size: 50,
    options: [],
}

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

    const wrapper = mount(
        
            
        ,
    )

    return {
        props,
        wrapper,
    }
}

describe('', () => {
    it('проверяет создание элемента', () => {
        const { wrapper } = setup()

        expect(wrapper.find('div.n2o-input-select').exists()).toBeTruthy()
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy