From 04a17693af28230cde1efb7775f578a64ff5ef85 Mon Sep 17 00:00:00 2001 From: kapibara Date: Tue, 19 Mar 2024 11:37:45 +0100 Subject: [PATCH 1/2] feat(User): added qa attribute for name and description nodes --- src/components/User/User.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/User/User.tsx b/src/components/User/User.tsx index fd1939fbdf..f37c984fee 100644 --- a/src/components/User/User.tsx +++ b/src/components/User/User.tsx @@ -9,6 +9,10 @@ import './User.scss'; const b = block('user'); +export const UserQa = { + NAME: 'user-name', + DESCRIPTION: 'user-description', +}; export const User = React.forwardRef( ( { @@ -42,9 +46,15 @@ export const User = React.forwardRef( ) : null} {name || showDescription ? (
- {name ? {name} : null} + {name ? ( + + {name} + + ) : null} {showDescription ? ( - {description} + + {description} + ) : null}
) : null} From e3ccb495d026d404a93d605b7dd2c9609a069d6f Mon Sep 17 00:00:00 2001 From: kapibara Date: Wed, 20 Mar 2024 11:48:14 +0100 Subject: [PATCH 2/2] feat(User): review fixes --- src/components/User/User.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/User/User.tsx b/src/components/User/User.tsx index f37c984fee..8cdf3101db 100644 --- a/src/components/User/User.tsx +++ b/src/components/User/User.tsx @@ -13,6 +13,7 @@ export const UserQa = { NAME: 'user-name', DESCRIPTION: 'user-description', }; + export const User = React.forwardRef( ( { @@ -47,12 +48,12 @@ export const User = React.forwardRef( {name || showDescription ? (
{name ? ( - + {name} ) : null} {showDescription ? ( - + {description} ) : null}