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

Version Path
foreman_webhooks-4.0.1 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-4.0.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.2.3 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.2.2 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.1.1 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.2.1 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.2.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.1.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.0.5 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-2.0.3 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.0.4 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-2.0.2 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.0.3 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.0.2 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.0.1 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-2.0.1 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-3.0.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-2.0.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
foreman_webhooks-1.1.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js