File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
packages/mui-component-mapper/src/tests Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { mount } from 'enzyme' ;
3+ import Typography from '@material-ui/core/Typography' ;
4+
5+ import PlainText from '../form-fields/plain-text' ;
6+
7+ describe ( 'PlainText component' , ( ) => {
8+ it ( 'renders correctly with three paragraphs' , ( ) => {
9+ const label = 'One \n Two \n Three' ;
10+ const name = 'name' ;
11+
12+ const wrapper = mount ( < PlainText name = { name } label = { label } /> ) ;
13+
14+ expect ( wrapper . find ( Typography ) ) . toHaveLength ( 3 ) ;
15+ } ) ;
16+
17+ it ( 'renders correctly with one paragraphs' , ( ) => {
18+ const label = 'One' ;
19+ const name = 'name' ;
20+
21+ const wrapper = mount ( < PlainText name = { name } label = { label } /> ) ;
22+
23+ expect ( wrapper . find ( Typography ) ) . toHaveLength ( 1 ) ;
24+ } ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments