-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Toc): added additional data-qa attributes inside component #1425
base: main
Are you sure you want to change the base?
feat(Toc): added additional data-qa attributes inside component #1425
Conversation
Preview is ready. |
Playwright Test Component is ready. |
@@ -29,6 +29,7 @@ export const Toc = React.forwardRef<HTMLElement, TocProps>(function Toc(props, r | |||
content={content} | |||
value={value} | |||
href={href} | |||
qa={qa ? `${qa}-item` : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be undefined by default, empty string results in attribute presence
@@ -46,6 +47,7 @@ export const Toc = React.forwardRef<HTMLElement, TocProps>(function Toc(props, r | |||
value={childrenValue} | |||
href={childrenHref} | |||
childItem={true} | |||
qa={qa ? `${qa}-item` : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@@ -44,5 +45,15 @@ export const TocItem = (props: TocItemProps) => { | |||
</a> | |||
); | |||
|
|||
return <div className={b('section', {child: childItem, active})}>{item}</div>; | |||
let testId = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
No description provided.