UNPKG

@brightlayer-ui/react-native-auth-workflow

Version:

Re-usable workflow components for Authentication and Registration within Eaton applications.

29 lines (28 loc) 1.39 kB
import React from 'react'; import { cleanup, render } from '@testing-library/react-native'; import { WorkflowCard, WorkflowCardBody } from 'src/components'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { Text } from 'react-native-paper'; describe('WorkflowCard Test', () => { afterEach(cleanup); it('WorkflowCard renders correctly', () => { render(React.createElement(SafeAreaProvider, null, React.createElement(WorkflowCard, { loading: true }, React.createElement(WorkflowCardBody, null, React.createElement(Text, null, "This is workflow card body content."))))).toJSON(); expect(render).toBeTruthy(); }); it('WorkflowCardHeader true test', () => { render(React.createElement(SafeAreaProvider, null, React.createElement(WorkflowCard, null, React.createElement(WorkflowCardBody, null, React.createElement(Text, null, "This is workflow card body content."))))).toJSON(); expect(render).toBeTruthy(); }); it('WorkflowCardHeader false test', () => { render(React.createElement(SafeAreaProvider, null, React.createElement(WorkflowCard, null, React.createElement(Text, null, "This is workflow card body content.")))).toJSON(); expect(render).toBeTruthy(); }); });