We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b629a43 commit a686a0eCopy full SHA for a686a0e
1 file changed
packages/mui-component-mapper/src/tests/plain-text.test.js
@@ -0,0 +1,25 @@
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
20
21
22
23
+ expect(wrapper.find(Typography)).toHaveLength(1);
24
25
+});
0 commit comments