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

components.widgets.Form.fields.AlertField.AlertField.test.js Maven / Gradle / Ivy

The newest version!
import React from 'react'

import AlertField from './AlertField'

const setup = propsOverride => mount()

describe('Проверка AlertField', () => {
    const props = {
        title: 'title',
        text: 'text',
        style: {},
        className: 'customClass',
        color: 'success',
        closeButton: 'true',
        href: 'http://example.org/',
    }

    const emptyProps = {}

    it('Alert отрисовался', () => {
        const wrapper = setup(props)

        expect(wrapper.find('.n2o-alert-field').exists()).toBeTruthy()
    })

    it('Alert отрисовался без props', () => {
        const wrapper = setup(emptyProps)

        expect(wrapper.find('.n2o-alert-field').exists()).toBeTruthy()
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy