Skip to content

Commit

Permalink
Rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
aednichols committed Jan 3, 2025
1 parent 1dc3533 commit ac3041f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/pages/workflows/workflow-details/WorkflowWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -274,7 +274,7 @@ export const WorkflowsContainer = (props: WorkflowContainerProps) => {
onDismiss: () => setExportingWorkflow(false),
}),
showDeleteModal &&
h(DeleteSnapshotModal, {
h(DeleteVersionModal, {
namespace,
name,
snapshotId: `${selectedSnapshot}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -14,7 +14,7 @@ describe('version action menu', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
disabled
isSnapshotOwner
onEditPermissions={mockOnEditPermissions}
Expand All @@ -39,7 +39,7 @@ describe('version action menu', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
isSnapshotOwner
onEditPermissions={mockOnEditPermissions}
onDelete={mockOnDelete}
Expand Down Expand Up @@ -103,7 +103,7 @@ describe('version action menu', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
isSnapshotOwner={false}
onEditPermissions={mockOnEditPermissions}
onDelete={mockOnDelete}
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('version action menu edit version permissions button', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
isSnapshotOwner
onEditPermissions={mockOnEditPermissions}
onDelete={mockOnDelete}
Expand All @@ -197,7 +197,7 @@ describe('version action menu delete version button', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
isSnapshotOwner
onEditPermissions={mockOnEditPermissions}
onDelete={mockOnDelete}
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('version action menu save as button', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
isSnapshotOwner
onEditPermissions={mockOnEditPermissions}
onDelete={mockOnDelete}
Expand All @@ -252,7 +252,7 @@ describe('version action menu edit button', () => {
// Act
await act(async () => {
render(
<SnapshotActionMenu
<VersionActionMenu
isSnapshotOwner
onEditPermissions={mockOnEditPermissions}
onDelete={mockOnDelete}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface SnapshotActionMenuProps {
*
* Currently supported actions: edit permissions, delete version, clone version, edit workflow
*/
const SnapshotActionMenu = (props: SnapshotActionMenuProps): ReactNode => {
const VersionActionMenu = (props: SnapshotActionMenuProps): ReactNode => {
const { disabled, isSnapshotOwner, onEditPermissions, onDelete, onClone, onEdit } = props;

const notSnapshotOwnerTooltip = 'You must be an owner of this snapshot';
Expand Down Expand Up @@ -94,4 +94,4 @@ const SnapshotActionMenu = (props: SnapshotActionMenuProps): ReactNode => {
);
};

export default SnapshotActionMenu;
export default VersionActionMenu;
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -12,7 +12,7 @@ describe('delete snapshot modal', () => {
// Act
await act(async () => {
render(
<DeleteSnapshotModal
<DeleteVersionModal
namespace='testnamespace'
name='methodname'
snapshotId='3'
Expand All @@ -37,7 +37,7 @@ describe('delete snapshot modal', () => {
// Act
await act(async () => {
render(
<DeleteSnapshotModal
<DeleteVersionModal
namespace='testnamespace'
name='methodname'
snapshotId='3'
Expand All @@ -61,7 +61,7 @@ describe('delete snapshot modal', () => {
// Act
await act(async () => {
render(
<DeleteSnapshotModal
<DeleteVersionModal
namespace='testnamespace'
name='methodname'
snapshotId='3'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactNode } from 'react';
import { DeleteConfirmationModal } from 'src/components/common';

interface DeleteSnapshotModalProps {
interface DeleteVersionModalProps {
/** The namespace of the workflow snapshot to be deleted (for display). */
namespace: string;

Expand All @@ -28,7 +28,7 @@ interface DeleteSnapshotModalProps {
* The onConfirm prop is passed directly to the underlying modal; this component
* does not already include the API call to perform the snapshot deletion.
*/
const DeleteSnapshotModal = (props: DeleteSnapshotModalProps): ReactNode => {
const DeleteVersionModal = (props: DeleteVersionModalProps): ReactNode => {
const { namespace, name, snapshotId, onConfirm, onDismiss } = props;

return (
Expand All @@ -55,4 +55,4 @@ const DeleteSnapshotModal = (props: DeleteSnapshotModalProps): ReactNode => {
);
};

export default DeleteSnapshotModal;
export default DeleteVersionModal;

0 comments on commit ac3041f

Please sign in to comment.