Sha256: 4dff07cfb657f1defbfac29e6383d0ce26f2c73301a72f6e34ab65db86eb1b49
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
import { testComponentSnapshotsWithFixtures } from '@theforeman/test'; import { propsFactory, webhooks, } from '../../../__tests__/WebhooksIndexPage.fixtures'; import WrappedWebhooksTable from '../index'; const props = { fetchAndPush: () => {}, onDeleteClick: () => {}, setToDelete: () => {}, itemCount: 0, canCreate: true, }; const fixtures = { 'should render when loading': propsFactory({ ...props, isLoading: true, hasData: false, hasError: false, toasts: [], }), 'should render with no data': propsFactory({ ...props, isLoading: false, hasData: false, hasError: false, toasts: [], }), 'should render with error': propsFactory({ isLoading: false, hasData: false, hasError: true, message: { type: 'error', text: 'this is error', }, ...props, toasts: [], }), 'should render with webhooks': propsFactory({ ...props, isLoading: false, hasError: false, hasData: true, toasts: [], webhooks, itemCount: webhooks.length, }), }; describe('WebhooksTable', () => { describe('rendering', () => testComponentSnapshotsWithFixtures(WrappedWebhooksTable, fixtures)); });
Version data entries
4 entries across 4 versions & 1 rubygems