diff --git a/src/components/Disclosure/Disclosure.tsx b/src/components/Disclosure/Disclosure.tsx index 21e7e50802..c7730ecede 100644 --- a/src/components/Disclosure/Disclosure.tsx +++ b/src/components/Disclosure/Disclosure.tsx @@ -6,7 +6,7 @@ import {isOfType} from '../utils/isOfType'; import {DisclosureProvider} from './DisclosureContext'; import {DisclosureDetails} from './DisclosureDetails/DisclosureDetails'; import {DefaultDisclosureSummary, DisclosureSummary} from './DisclosureSummary/DisclosureSummary'; -import {b} from './cn'; +import {b} from './constants'; import './Disclosure.scss'; diff --git a/src/components/Disclosure/DisclosureDetails/DisclosureDetails.tsx b/src/components/Disclosure/DisclosureDetails/DisclosureDetails.tsx index c9d7783d92..5d861723a7 100644 --- a/src/components/Disclosure/DisclosureDetails/DisclosureDetails.tsx +++ b/src/components/Disclosure/DisclosureDetails/DisclosureDetails.tsx @@ -4,7 +4,7 @@ import {CSSTransition} from 'react-transition-group'; import {getCSSTransitionClassNames} from '../../utils/transition'; import {useDisclosureAttributes} from '../DisclosureContext'; -import {b} from '../cn'; +import {DisclosureQa, b} from '../constants'; export interface DisclosureDetailsProps { children: React.ReactNode; @@ -30,6 +30,7 @@ export function DisclosureDetails({children}: DisclosureDetailsProps) { role="region" aria-labelledby={ariaLabelledby} className={b('content', {visible: expanded})} + data-qa={DisclosureQa.DETAILS} > {children} diff --git a/src/components/Disclosure/DisclosureSummary/DisclosureSummary.tsx b/src/components/Disclosure/DisclosureSummary/DisclosureSummary.tsx index ffc5350e42..acdacae3e2 100644 --- a/src/components/Disclosure/DisclosureSummary/DisclosureSummary.tsx +++ b/src/components/Disclosure/DisclosureSummary/DisclosureSummary.tsx @@ -3,7 +3,7 @@ import React from 'react'; import {ArrowToggle} from '../../ArrowToggle'; import type {DisclosureSize} from '../Disclosure'; import {useDisclosureAttributes, useToggleDisclosure} from '../DisclosureContext'; -import {b} from '../cn'; +import {DisclosureQa, b} from '../constants'; const ComponentSizeToIconSizeMap: Record = { m: 14, @@ -47,6 +47,7 @@ export function DefaultDisclosureSummary({ id={id} onClick={onClick} disabled={disabled} + data-qa={DisclosureQa.SUMMARY} >