1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { FileViewerAction } from './file-viewer-action';
7 import { ThemeProvider } from '@mui/material';
8 import { CustomTheme } from 'common/custom-theme';
10 describe('FileViewerAction', () => {
15 onClick: cy.stub().as('onClick'),
16 href: 'https://example.com',
20 it('should render properly and handle click', () => {
23 <ThemeProvider theme={CustomTheme}>
24 <FileViewerAction {...props} />
28 cy.get('[data-cy=open-in-new-tab]').should('exist');
29 cy.get('[data-cy=open-in-new-tab]').click();
32 cy.get('@onClick').should('have.been.called');