Skip to content

Commit

Permalink
test(playwright): adding data-testid to support e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: yash37158 <[email protected]>
  • Loading branch information
yash37158 committed Oct 2, 2024
1 parent 252ed53 commit 7d34a3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/custom/TransferModal/TransferList/TransferList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function TransferList({
listId?: string
) => (
<StyledPaper>
<List dense component="div" role="list">
<List dense component="div" role="list" data-testid={`connections-${listId}`}>
{items.length > 0 ? (
items.map((item) => {
const labelId = `transfer-list-item-${item.name}-label`;
Expand Down Expand Up @@ -302,6 +302,7 @@ function TransferList({
(rightPermission && (left?.length === 0 || left.length < leftCount))
}
aria-label="move all right"
data-testid="move-all-right"
>
<RightArrowIcon width={18} height={18} />
<RightArrowIcon style={{ position: 'absolute', left: '27px' }} width={18} height={18} />
Expand All @@ -312,6 +313,7 @@ function TransferList({
onClick={handleCheckedRight}
disabled={!rightPermission || (rightPermission && leftChecked.length === 0)}
aria-label="move selected right"
data-testid="move-selected-right"
>
<RightArrowIcon width={18} height={18} />
</TransferButton>
Expand All @@ -321,6 +323,7 @@ function TransferList({
onClick={handleCheckedLeft}
disabled={!leftPermission || (leftPermission && rightChecked.length === 0)}
aria-label="move selected left"
data-testid="move-selected-left"
>
<LeftArrowIcon width={18} height={18} />
</TransferButton>
Expand All @@ -333,6 +336,7 @@ function TransferList({
(leftPermission && (right?.length === 0 || right.length < rightCount))
}
aria-label="move all left"
data-testid="move-all-left"
>
<LeftArrowIcon width={18} height={18} />
<LeftArrowIcon style={{ position: 'absolute', left: '27px' }} width={18} height={18} />
Expand Down

0 comments on commit 7d34a3d

Please sign in to comment.