UNPKG

@financial-times/n-conversion-forms

Version:

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

86 lines (64 loc) 1.68 kB
import { PaymentType } from './index'; import { expectToRenderCorrectly } from '../test-jest/helpers/expect-to-render-correctly'; expect.extend(expectToRenderCorrectly); describe('PaymentType', () => { it('render with default props', () => { const props = {}; expect(PaymentType).toRenderCorrectly(props); }); it('render with enableApplepay', () => { const props = { enableApplepay: true, }; expect(PaymentType).toRenderCorrectly(props); }); it('render with enableCreditcard', () => { const props = { enableCreditcard: true, }; expect(PaymentType).toRenderCorrectly(props); }); it('render with enableDirectdebit', () => { const props = { enableDirectdebit: true, }; expect(PaymentType).toRenderCorrectly(props); }); it('render with enablePaypal', () => { const props = { enablePaypal: true, }; expect(PaymentType).toRenderCorrectly(props); }); it('render with value', () => { const props = { value: 'paypal', }; expect(PaymentType).toRenderCorrectly(props); }); it('can initialise with the loader visible', () => { const props = { showLoaderOnInit: true, }; expect(PaymentType).toRenderCorrectly({}, props); }); it('render with isSingleTerm', () => { const props = { isSingleTerm: true, }; expect(PaymentType).toRenderCorrectly(props); }); it('render with isSingleTermChecked', () => { const props = { isSingleTerm: true, isSingleTermChecked: true, }; expect(PaymentType).toRenderCorrectly(props); }); it('render with enableBankTransfer', () => { const props = { enableBankTransfer: true, }; expect(PaymentType).toRenderCorrectly(props); }); });