Skip to content

Commit d1ffcd3

Browse files
author
Hector Arce De Las Heras
committed
Add data-testid to Icon Component in Drawer
This commit introduces the data-testid attribute to the Icon component within the Drawer. This enhancement facilitates more effective testing by providing a stable way to select the Icon component in our test suites, leading to more reliable and maintainable tests.
1 parent d84a730 commit d1ffcd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/drawer/drawerStandAlone.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ const DrawerStandAloneComponent = (
4646
>
4747
{!blocked && (
4848
<DrawerNavigationStyled level={props.level} styles={props.styles}>
49-
<ElementOrIcon customIconStyles={props.styles.icon} {...props.closeIcon} />
49+
<ElementOrIcon
50+
customIconStyles={props.styles.icon}
51+
{...props.closeIcon}
52+
dataTestId={`${props.dataTestId}CloseIcon`}
53+
/>
5054
</DrawerNavigationStyled>
5155
)}
5256
<DrawerTitleContentFooterContainerStyled

0 commit comments

Comments
 (0)