1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { AccountMenuComponent } from './account-menu';
8 describe('<AccountMenu />', () => {
15 email: 'email@example.com',
18 uuid: 'zzzzz-tpzed-testuseruuid',
28 dispatch: cy.stub().as('dispatch'),
32 describe('Logout Menu Item', () => {
34 cy.mount(<AccountMenuComponent {...props} />);
37 it('should dispatch a logout action when clicked', () => {
38 cy.get('button').should('exist').click();
39 cy.get('[data-cy="logout-menuitem"]').click();
40 cy.get('@dispatch').should('have.been.calledWith', {
41 payload: {deleteLinkData: true, preservePath: false},