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

components.widgets.Table.cells.SwitchCell.SwitchCell.test.js Maven / Gradle / Ivy

The newest version!
import React from 'react'

import SwitchCell from './SwitchCell'
import { model, model2, modelFromDefaultView } from './switchCellStoryProps'

const setupOptions = props => shallow()

describe('SwitchCell __tests__ ', () => {
    it('Компонент возвращает верный cell - TextCell', () => {
        const wrapper = setupOptions(model)

        expect(wrapper.props().src).toBe('TextCell')
        expect(wrapper.props().text).toBe('TextCell text')
    })

    it('Компонент возвращает верный cell - LinkCell', () => {
        const wrapper = setupOptions(model2)

        expect(wrapper.props().src).toBe('LinkCell')
    })

    it('Компонент возвращает верный default cell - ImageCell', () => {
        const wrapper = setupOptions(modelFromDefaultView)

        expect(wrapper.props().src).toBe('ImageCell')
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy