Sha256: 49b45df415d1d6586de19ac967f80c20f0778992db06b652917dca35223cd8a0
Contents?: true
Size: 1.17 KB
Versions: 19
Compression:
Stored size: 1.17 KB
Contents
import React from 'react'; import { IntegrationTestHelper } from '@theforeman/test'; import { Router } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import ConnectedWebhooksIndexPage from '../index'; import * as selectors from '../../WebhooksPageSelectors'; import * as editSelectors from '../Components/WebhookEditModalSelectors'; import { spySelector, spyEditSelector } from './WebhooksIndexPage.fixtures'; spySelector(selectors); spyEditSelector(editSelectors); describe('WebhooksIndexPage - Integration Test', () => { it('should flow', () => { const history = createMemoryHistory(); history.push({ pathname: '/webhooks', search: '' }); const integrationTestHelper = new IntegrationTestHelper(); const component = integrationTestHelper.mount( <Router history={history}> <ConnectedWebhooksIndexPage history={history} /> </Router> ); integrationTestHelper.takeStoreAndLastActionSnapshot('rendered'); expect(component.exists('WebhooksTable')).toEqual(true); expect(component.exists('WebhookCreateModal')).toEqual(true); integrationTestHelper.takeStoreAndLastActionSnapshot('initial state'); }); });
Version data entries
19 entries across 19 versions & 1 rubygems