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

components.core.OverlayPages.test.js Maven / Gradle / Ivy

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

import FactoryProvider from '../../core/factory/FactoryProvider'
import createFactoryConfig from '../../core/factory/createFactoryConfig'

import { OverlayPages } from './OverlayPages'

const setup = propsOverride => mount(
    
        
            
        
    ,
)

describe('', () => {
    it('Мод modal', () => {
        const wrapper = setup({
            overlays: [
                {
                    pageId: 'test',
                    name: 'test',
                    visible: true,
                    mode: 'modal',
                },
            ],
        })

        expect(wrapper.find('.n2o-overlay-pages').exists()).toBeTruthy()
    })
})

describe('', () => {
    it('Мод dialog', () => {
        const wrapper = setup({
            overlays: [
                {
                    pageId: 'test',
                    name: 'test',
                    visible: true,
                    mode: 'dialog',
                },
            ],
        })

        expect(wrapper.find('.n2o-overlay-pages').exists()).toBeTruthy()
    })
})

describe('', () => {
    it('Мод drawer', () => {
        const wrapper = setup({
            overlays: [
                {
                    pageId: 'test',
                    name: 'test',
                    visible: true,
                    mode: 'drawer',
                },
            ],
        })

        expect(wrapper.find('.n2o-overlay-pages').exists()).toBeTruthy()
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy