UNPKG

@financial-times/n-conversion-forms

Version:

Containing jsx components and styles for forms included on Accounts and Acqusition apps (next-signup, next-profile, next-retention, etc).

81 lines (69 loc) 1.54 kB
import { ProgressIndicator } from './index'; import { expectToRenderCorrectly } from '../test-jest/helpers/expect-to-render-correctly'; expect.extend(expectToRenderCorrectly); describe('ProgressIndicator', () => { it('renders with default props', () => { const props = { items: [ { url: 'https://foo.com', name: 'Item name', }, ], }; expect(ProgressIndicator).toRenderCorrectly(props); }); it('renders items that are complete', () => { const props = { items: [ { url: 'https://foo.com', name: 'Item name', isComplete: true, isCurrent: false, }, ], }; expect(ProgressIndicator).toRenderCorrectly(props); }); it('renders items that are not complete and not current', () => { const props = { items: [ { url: 'https://foo.com', name: 'Item name', isComplete: false, isCurrent: false, }, ], }; expect(ProgressIndicator).toRenderCorrectly(props); }); it('renders items that are not complete and current', () => { const props = { items: [ { url: 'https://foo.com', name: 'Item name', isComplete: false, isCurrent: true, }, ], }; expect(ProgressIndicator).toRenderCorrectly(props); }); it('renders completed items with disabled links', () => { const props = { items: [ { url: 'https://foo.com', name: 'Item name', isComplete: true, isCurrent: false, }, ], disableLinks: true, }; expect(ProgressIndicator).toRenderCorrectly(props); }); });