From ac3041f196c4d36910934d45ee9a848e9e264986 Mon Sep 17 00:00:00 2001 From: Adam Nichols Date: Fri, 3 Jan 2025 18:41:15 -0500 Subject: [PATCH] Rename files --- .../workflow-details/WorkflowWrapper.ts | 8 ++++---- ...nMenu.test.tsx => VersionActionMenu.test.tsx} | 16 ++++++++-------- ...pshotActionMenu.tsx => VersionActionMenu.tsx} | 4 ++-- ...odal.test.tsx => DeleteVersionModal.test.tsx} | 8 ++++---- ...eSnapshotModal.tsx => DeleteVersionModal.tsx} | 6 +++--- 5 files changed, 21 insertions(+), 21 deletions(-) rename src/workflows/{SnapshotActionMenu.test.tsx => VersionActionMenu.test.tsx} (96%) rename src/workflows/{SnapshotActionMenu.tsx => VersionActionMenu.tsx} (96%) rename src/workflows/modals/{DeleteSnapshotModal.test.tsx => DeleteVersionModal.test.tsx} (93%) rename src/workflows/modals/{DeleteSnapshotModal.tsx => DeleteVersionModal.tsx} (91%) diff --git a/src/pages/workflows/workflow-details/WorkflowWrapper.ts b/src/pages/workflows/workflow-details/WorkflowWrapper.ts index 2159d7f44e..c96aaa52f1 100644 --- a/src/pages/workflows/workflow-details/WorkflowWrapper.ts +++ b/src/pages/workflows/workflow-details/WorkflowWrapper.ts @@ -20,11 +20,11 @@ import * as Style from 'src/libs/style'; import * as Utils from 'src/libs/utils'; import { withBusyState } from 'src/libs/utils'; import { CreateWorkflowModal } from 'src/workflows/modals/CreateWorkflowModal'; -import DeleteSnapshotModal from 'src/workflows/modals/DeleteSnapshotModal'; +import DeleteVersionModal from 'src/workflows/modals/DeleteVersionModal'; import { EditWorkflowModal } from 'src/workflows/modals/EditWorkflowModal'; import ExportWorkflowModal from 'src/workflows/modals/ExportWorkflowModal'; import { PermissionsModal } from 'src/workflows/modals/PermissionsModal'; -import SnapshotActionMenu from 'src/workflows/SnapshotActionMenu'; +import VersionActionMenu from 'src/workflows/VersionActionMenu'; import { isGoogleWorkspace, WorkspaceInfo, WorkspaceWrapper } from 'src/workspaces/utils'; import * as WorkspaceUtils from 'src/workspaces/utils'; @@ -240,7 +240,7 @@ export const WorkflowsContainer = (props: WorkflowContainerProps) => { ['Export to Workspace'] ), div({ style: { marginLeft: '1rem', marginRight: '0.5rem' } }, [ - h(SnapshotActionMenu, { + h(VersionActionMenu, { disabled: !snapshot, isSnapshotOwner, onEditPermissions: () => setPermissionsModalOpen(true), @@ -274,7 +274,7 @@ export const WorkflowsContainer = (props: WorkflowContainerProps) => { onDismiss: () => setExportingWorkflow(false), }), showDeleteModal && - h(DeleteSnapshotModal, { + h(DeleteVersionModal, { namespace, name, snapshotId: `${selectedSnapshot}`, diff --git a/src/workflows/SnapshotActionMenu.test.tsx b/src/workflows/VersionActionMenu.test.tsx similarity index 96% rename from src/workflows/SnapshotActionMenu.test.tsx rename to src/workflows/VersionActionMenu.test.tsx index 30fc138d09..fdba3d736d 100644 --- a/src/workflows/SnapshotActionMenu.test.tsx +++ b/src/workflows/VersionActionMenu.test.tsx @@ -2,7 +2,7 @@ import { act, screen } from '@testing-library/react'; import userEvent, { UserEvent } from '@testing-library/user-event'; import React from 'react'; import { renderWithAppContexts as render } from 'src/testing/test-utils'; -import SnapshotActionMenu from 'src/workflows/SnapshotActionMenu'; +import VersionActionMenu from 'src/workflows/VersionActionMenu'; const mockOnDelete = jest.fn(); const mockOnEditPermissions = jest.fn(); @@ -14,7 +14,7 @@ describe('version action menu', () => { // Act await act(async () => { render( - { // Act await act(async () => { render( - { // Act await act(async () => { render( - { // Act await act(async () => { render( - { // Act await act(async () => { render( - { // Act await act(async () => { render( - { // Act await act(async () => { render( - { +const VersionActionMenu = (props: SnapshotActionMenuProps): ReactNode => { const { disabled, isSnapshotOwner, onEditPermissions, onDelete, onClone, onEdit } = props; const notSnapshotOwnerTooltip = 'You must be an owner of this snapshot'; @@ -94,4 +94,4 @@ const SnapshotActionMenu = (props: SnapshotActionMenuProps): ReactNode => { ); }; -export default SnapshotActionMenu; +export default VersionActionMenu; diff --git a/src/workflows/modals/DeleteSnapshotModal.test.tsx b/src/workflows/modals/DeleteVersionModal.test.tsx similarity index 93% rename from src/workflows/modals/DeleteSnapshotModal.test.tsx rename to src/workflows/modals/DeleteVersionModal.test.tsx index fffe05faca..0644b6c425 100644 --- a/src/workflows/modals/DeleteSnapshotModal.test.tsx +++ b/src/workflows/modals/DeleteVersionModal.test.tsx @@ -2,7 +2,7 @@ import { act, screen, within } from '@testing-library/react'; import userEvent, { UserEvent } from '@testing-library/user-event'; import React from 'react'; import { renderWithAppContexts as render } from 'src/testing/test-utils'; -import DeleteSnapshotModal from 'src/workflows/modals/DeleteSnapshotModal'; +import DeleteVersionModal from 'src/workflows/modals/DeleteVersionModal'; const mockOnConfirm = jest.fn(); const mockOnDismiss = jest.fn(); @@ -12,7 +12,7 @@ describe('delete snapshot modal', () => { // Act await act(async () => { render( - { // Act await act(async () => { render( - { // Act await act(async () => { render( - { +const DeleteVersionModal = (props: DeleteVersionModalProps): ReactNode => { const { namespace, name, snapshotId, onConfirm, onDismiss } = props; return ( @@ -55,4 +55,4 @@ const DeleteSnapshotModal = (props: DeleteSnapshotModalProps): ReactNode => { ); }; -export default DeleteSnapshotModal; +export default DeleteVersionModal;