1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { shallow, configure } from 'enzyme';
7 import Adapter from 'enzyme-adapter-react-16';
8 import { FileViewerAction } from './file-viewer-action';
10 configure({ adapter: new Adapter() });
12 describe('FileViewerAction', () => {
18 href: 'https://collections.example.com/c=zzzzz-4zz18-k0hamvtwyit6q56/t=xxxxxxx/LIMS/1.html',
22 it('should render properly and handle click', () => {
24 const wrapper = shallow(<FileViewerAction {...props} />);
25 wrapper.find('a').simulate('click');
28 expect(wrapper).not.toBeUndefined();
31 expect(props.onClick).toHaveBeenCalled();