Sha256: 41c1e953cb2e48d3a6f7e621a3df6d6e3306052bd6e347027da24d50f5b5de60
Contents?: true
Size: 1.22 KB
Versions: 18
Compression:
Stored size: 1.22 KB
Contents
import { testComponentSnapshotsWithFixtures } from '@theforeman/test'; import WebhookForm from '../WebhookForm'; const props = { handleSubmit: jest.fn(), onCancel: jest.fn(), onSuccess: jest.fn(), templates: [ { id: 204, name: 'default template' }, { id: 205, name: 'default template clone' }, ], availableEvents: ['host_created'], isEventsLoading: false, isTemplatesLoading: false, }; const fixtures = { 'should render for new page': { ...props, initialValues: { http_method: 'POST', enabled: true, verify_ssl: true, http_content_type: 'application/json', event: 'host_created.event.foreman', }, }, 'should render for edit page': { ...props, initialValues: { id: 54, http_method: 'PUT', enabled: true, verify_ssl: true, http_content_type: 'application/json', event: 'host_created.event.foreman', name: 'first webhook', target_url: 'https://foreman.example.com', user: undefined, password: undefined, webhook_template_id: 204, ssl_ca_certs: undefined, }, }, }; describe('WebhookForm', () => { describe('rendering', () => testComponentSnapshotsWithFixtures(WebhookForm, fixtures)); });
Version data entries
18 entries across 18 versions & 1 rubygems