We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18b449f commit 7163a45Copy full SHA for 7163a45
javascript/grid-ui/src/tests/Ring.test.tsx
@@ -0,0 +1,27 @@
1
+import React from 'react';
2
+import { shallow, mount } from 'enzyme';
3
+import Ring from '../components/RingSystem/Ring/Ring';
4
+
5
+test('Ring component', () => {
6
+ let parentFunc = function() {
7
+ console.log('Dummy parent func');
8
+ }
9
10
+ const ring = shallow(<Ring
11
+ radius={2}
12
+ stroke={1}
13
+ id={'2'}
14
+ color={'#00000'}
15
+ progress={10}
16
+ offset={1}
17
+ parentCB={parentFunc}
18
+ label={'random label'}
19
+ />)
20
21
+ const props = ring.getElements()[0].props.children.props.children.props;
22
+ const circle = props.children[0].props;
23
24
+ expect(parseInt(props.id)).toEqual(2);
25
+ expect(parseInt(props.height)).toEqual(4);
26
+ expect(parseInt(props.width)).toEqual(4);
27
+});
0 commit comments