Skip to content

Commit

Permalink
test: add ids for copy and move buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Torrent committed Aug 17, 2021
1 parent 38fef57 commit dc8c279
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/main/TableToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import clsx from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { ITEMS_TABLE_DELETE_SELECTED_ITEMS_ID } from '../../config/selectors';
import {
ITEMS_TABLE_DELETE_SELECTED_ITEMS_ID,
ITEMS_TABLE_MOVE_SELECTED_ITEMS_ID,
ITEMS_TABLE_COPY_SELECTED_ITEMS_ID
} from '../../config/selectors';
import DeleteButton from '../common/DeleteButton';
import NewItemButton from './NewItemButton';
import CopyButton from './CopyButtons';
Expand Down Expand Up @@ -64,14 +68,14 @@ const TableToolbar = (props) => {

{numSelected > 0 && (
<MoveButton
id="move"
id={ITEMS_TABLE_MOVE_SELECTED_ITEMS_ID}
color="secondary"
itemIds={selected}
/>
)}
{numSelected > 0 && (
<CopyButton
id="copy"
id={ITEMS_TABLE_COPY_SELECTED_ITEMS_ID}
color="secondary"
itemIds={selected}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/config/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const buildItemsTableRowId = (id) => `itemsTableRow-${id}`;
export const ITEMS_TABLE_EMPTY_ROW_ID = 'itemsTableEmptyRow';
export const ITEMS_TABLE_DELETE_SELECTED_ITEMS_ID =
'itemsTableDeleteSelectedItems';
export const ITEMS_TABLE_COPY_SELECTED_ITEMS_ID = 'itemsTableCopySelectedItems'
export const ITEMS_TABLE_MOVE_SELECTED_ITEMS_ID = 'itemsTableMoveSelectedItems';
export const ITEMS_TABLE_ROW_CHECKBOX_CLASS = 'itemsTableRowCheckbox';
export const UPLOADER_ID = 'uploader';
export const UPLOADER_DROP_ZONE_ITEMS_CLASS = 'uppy-Root';
Expand Down

0 comments on commit dc8c279

Please sign in to comment.