1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import Adapter from 'enzyme-adapter-react-16';
7 import {configure, shallow } from 'enzyme';
9 import { AccountMenuComponent } from './account-menu';
11 configure({ adapter: new Adapter() });
13 describe('<AccountMenu />', () => {
21 email: 'email@example.com',
24 uuid: 'zzzzz-tpzed-testuseruuid',
38 describe('Logout Menu Item', () => {
40 wrapper = shallow(<AccountMenuComponent {...props} />).dive();
43 it('should dispatch a logout action when clicked', () => {
44 wrapper.find('[data-cy="logout-menuitem"]').simulate('click');
45 expect(props.dispatch).toHaveBeenCalledWith({
46 payload: {deleteLinkData: true, preservePath: false},