File tree Expand file tree Collapse file tree 1 file changed +16
-18
lines changed Expand file tree Collapse file tree 1 file changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -227,22 +227,20 @@ describe('<Tree />', () => {
227
227
} ) ;
228
228
229
229
230
- // it('allows zooming in/out according to `props.scaleExtent` if `props.zoomable`', () => {
231
- // const zoomableComponent = mount(
232
- // <Tree
233
- // data={mockData}
234
- // />
235
- // );
236
- // const nonZoomableComponent = mount(
237
- // <Tree
238
- // data={mockData}
239
- // zoomable={false}
240
- // />
241
- // );
242
- //
243
- // zoomableComponent.find('svg').simulate('touchmove');
244
- //
245
- // expect(zoomableComponent.find('svg').prop('transform')).toBeDefined();
246
- // expect(nonZoomableComponent.find('svg').prop('transform')).toBeUndefined();
247
- // });
230
+ it ( 'adds the `.rd3t-grabbable` class if `props.zoomable`' , ( ) => {
231
+ const zoomableComponent = shallow (
232
+ < Tree
233
+ data = { mockData }
234
+ />
235
+ ) ;
236
+ const nonZoomableComponent = shallow (
237
+ < Tree
238
+ data = { mockData }
239
+ zoomable = { false }
240
+ />
241
+ ) ;
242
+
243
+ expect ( zoomableComponent . find ( '.rd3t-tree-container' ) . hasClass ( 'rd3t-grabbable' ) ) . toBe ( true ) ;
244
+ expect ( nonZoomableComponent . find ( '.rd3t-tree-container' ) . hasClass ( 'rd3t-grabbable' ) ) . toBe ( false ) ;
245
+ } ) ;
248
246
} ) ;
You can’t perform that action at this time.
0 commit comments