Skip to content

Commit

Permalink
fix: removed content language dependency of data-cy selectors. closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
syam babu committed Jan 8, 2025
1 parent 71a7de8 commit 56e4098
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/DraggableTree/DraggableTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const DraggableTable = ({ data, setData, fallbackStatus, setFallbackStatus, tran
dataIndex: contentLanguageKeyMap[language],
key: contentLanguageKeyMap[language],
editable: true,
['data-cy']: `taxonomy-concept-row-more-btn-${language}`,
['data-cy']: `taxonomy-concept-row-more-btn`,
}));

const moveRow = useCallback(
Expand Down
7 changes: 1 addition & 6 deletions src/components/DraggableTree/EditableCell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,8 @@ const EditableCell = ({ title, editable, children, dataIndex, record, handleSave
);
}

let dataCy = ``;
if (typeof value === 'string') {
dataCy = `taxonomy-concept-cell${value.replace(/\s+/g, '')}`;
}

return (
<td {...restProps} data-cy={dataCy}>
<td {...restProps} data-cy="taxonomy-concept-cell">
{editing ? (
<TextArea
ref={inputRef}
Expand Down

0 comments on commit 56e4098

Please sign in to comment.