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

components.widgets.Form.fieldsets.TitleFieldset.TitleFieldset.test.js Maven / Gradle / Ivy

The newest version!
import React from 'react'

import TitleFieldset from './TitleFieldset'

const setup = (propsOverride) => {
    const props = {
        label: 'label',
        subTitle: 'subTitle',
    }

    return mount(
         {}} {...props} {...propsOverride} />,
    )
}

describe('Тесты TitleFieldset', () => {
    it('Отрисовывается', () => {
        const wrapper = setup()

        expect(wrapper.find('.title-fieldset').exists()).toEqual(true)
    })
    it('Отрисовываются все тексты', () => {
        const wrapper = setup()

        expect(wrapper.find('.title-fieldset-text').text()).toEqual('label')
        expect(wrapper.find('.title-fieldset-subtitle').text()).toEqual('subTitle')
    })
    it('Отрисовывается линия', () => {
        const wrapper = setup({
            showLine: true,
        })

        expect(wrapper.find('.title-fieldset-line').exists()).toEqual(true)
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy