diff --git a/packages/sage-react/lib/Accordion/Accordion.jsx b/packages/sage-react/lib/Accordion/Accordion.jsx index a0e61abb84..4b0baedb4c 100644 --- a/packages/sage-react/lib/Accordion/Accordion.jsx +++ b/packages/sage-react/lib/Accordion/Accordion.jsx @@ -7,7 +7,7 @@ export const Accordion = ({ children, id, onlyOnePanelExpanded, - testId, + kjbElementId, ...rest }) => { const classNames = classnames( @@ -19,7 +19,7 @@ export const Accordion = ({ ); return ( -
+
{children}
); @@ -30,7 +30,7 @@ Accordion.defaultProps = { className: '', id: '', onlyOnePanelExpanded: false, - testId: null, + kjbElementId: null, }; Accordion.propTypes = { @@ -38,5 +38,5 @@ Accordion.propTypes = { className: PropTypes.string, id: PropTypes.string, onlyOnePanelExpanded: PropTypes.bool, - testId: PropTypes.string, + kjbElementId: PropTypes.string, }; diff --git a/packages/sage-react/lib/Accordion/Accordion.story.jsx b/packages/sage-react/lib/Accordion/Accordion.story.jsx index 5daada7d4d..138dd01c35 100644 --- a/packages/sage-react/lib/Accordion/Accordion.story.jsx +++ b/packages/sage-react/lib/Accordion/Accordion.story.jsx @@ -16,8 +16,8 @@ const MultipleTemplate = () => { }; return ( - - + + { id="checkbox1-demo" label="Grant offers" name="checkbox1-demo" - testId="grantOffers" + kjbElementId="grantOffers" /> { id="checkbox2-demo" label="Add tags" name="checkbox2-demo" - testId="addTags" + kjbElementId="addTags" /> { id="checkbox3-demo" label="Subscribe to emails" name="checkbox3-demo" - testId="subscribeToEmails" + kjbElementId="subscribeToEmails" /> - + { id="checkbox1-demo" label="Grant offers" name="checkbox1-demo" - testId="grantOffers" + kjbElementId="grantOffers" /> { id="checkbox2-demo" label="Add tags" name="checkbox2-demo" - testId="addTags" + kjbElementId="addTags" /> { id="checkbox3-demo" label="Subscribe to emails" name="checkbox3-demo" - testId="subscribeToEmails" + kjbElementId="subscribeToEmails" /> - + { id="checkbox1-demo" label="Grant offers" name="checkbox1-demo" - testId="grantOffers" + kjbElementId="grantOffers" /> { id="checkbox2-demo" label="Add tags" name="checkbox2-demo" - testId="addTags" + kjbElementId="addTags" /> { id="checkbox3-demo" label="Subscribe to emails" name="checkbox3-demo" - testId="subscribeToEmails" + kjbElementId="subscribeToEmails" /> @@ -110,7 +110,7 @@ const MultipleTemplate = () => { const DefaultTemplate = () => ( - + - +
+
{title && ( -

+

{title} {titleAddon}

)} {description && ( -

{description}

+

{description}

)}
{actions && ( @@ -88,7 +88,7 @@ export const Alert = ({ value="Close" onClick={handleDismiss} aria-label="Close Alert" - testId="closeButton" + kjbElementId="closeButton" />
)} @@ -107,7 +107,7 @@ Alert.defaultProps = { icon: null, onDismiss: null, small: false, - testId: null, + kjbElementId: null, title: null, titleAddon: null, }; @@ -121,7 +121,7 @@ Alert.propTypes = { icon: PropTypes.oneOf(Object.values(SageTokens.ICONS)), onDismiss: PropTypes.func, small: PropTypes.bool, - testId: PropTypes.string, + kjbElementId: PropTypes.string, title: PropTypes.string, titleAddon: PropTypes.string, }; diff --git a/packages/sage-react/lib/Alert/Alert.story.jsx b/packages/sage-react/lib/Alert/Alert.story.jsx index 9455d3ad98..6cae72d91d 100644 --- a/packages/sage-react/lib/Alert/Alert.story.jsx +++ b/packages/sage-react/lib/Alert/Alert.story.jsx @@ -48,14 +48,14 @@ DefaultWithActions.args = { Check Usage @@ -68,7 +68,7 @@ DismissableAlert.args = { description: 'Body duis rhoncus neque, sed nulla sed quis fames. Eu eu ut at odio ultrices orci varius habitant. Tempor vulputate in nisl massa eget id.', color: Alert.COLORS.DEFAULT, dismissable: true, - testId: 'exampleAlert', + kjbElementId: 'exampleAlert', onClickDismiss: () => console.log('clicked to dismiss'), // eslint-disable-line }; @@ -83,13 +83,13 @@ DismissableAlertWithActions.args = { Check Usage @@ -102,20 +102,20 @@ export const NonDismissableAlert = Template.bind({}); NonDismissableAlert.args = { color: Alert.COLORS.APPROACHING, description: 'Body duis rhoncus neque, sed nulla sed quis fames. Eu eu ut at odio ultrices orci varius habitant. Tempor vulputate in nisl massa eget id.', - testId: 'nonDismissableAlert', + kjbElementId: 'nonDismissableAlert', actions: ( <> Check Usage @@ -129,13 +129,13 @@ SmallAlert.args = { dismissable: true, title: null, description: 'Body duis rhoncus neque, sed nulla sed quis fames et tu odio.', - testId: 'smallAlert', + kjbElementId: 'smallAlert', actions: ( <> Check Usage diff --git a/packages/sage-react/lib/Badge/Badge.jsx b/packages/sage-react/lib/Badge/Badge.jsx index 471049f7a2..dca5131d79 100644 --- a/packages/sage-react/lib/Badge/Badge.jsx +++ b/packages/sage-react/lib/Badge/Badge.jsx @@ -14,7 +14,7 @@ export const Badge = React.forwardRef(({ isInteractive, isStatus, large, - testId, + kjbElementId, value, ...rest }, ref) => { @@ -33,7 +33,7 @@ export const Badge = React.forwardRef(({ return ( @@ -69,7 +69,7 @@ Badge.defaultProps = { isDropdown: false, isStatus: false, large: false, - testId: null, + kjbElementId: null, }; Badge.propTypes = { @@ -81,6 +81,6 @@ Badge.propTypes = { isDropdown: PropTypes.bool, isStatus: PropTypes.bool, large: PropTypes.bool, - testId: PropTypes.string, + kjbElementId: PropTypes.string, value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired, }; diff --git a/packages/sage-react/lib/Badge/Badge.story.jsx b/packages/sage-react/lib/Badge/Badge.story.jsx index ff19fd45dd..d5a4f289a6 100644 --- a/packages/sage-react/lib/Badge/Badge.story.jsx +++ b/packages/sage-react/lib/Badge/Badge.story.jsx @@ -35,7 +35,7 @@ IndicatorBadge.args = { dot: ( ), - testId: 'indicatorBadge', + kjbElementId: 'indicatorBadge', }; export const InteractiveBadge = Template.bind({}); @@ -45,7 +45,7 @@ InteractiveBadge.args = { dot: ( ), - testId: 'interactiveBadge', + kjbElementId: 'interactiveBadge', }; export const LargeBadge = Template.bind({}); @@ -55,5 +55,5 @@ LargeBadge.args = { dot: ( ), - testId: 'largeBadge', + kjbElementId: 'largeBadge', }; diff --git a/packages/sage-react/lib/Banner/Banner.jsx b/packages/sage-react/lib/Banner/Banner.jsx index 863470e54d..eead68719f 100644 --- a/packages/sage-react/lib/Banner/Banner.jsx +++ b/packages/sage-react/lib/Banner/Banner.jsx @@ -8,7 +8,7 @@ import { BANNER_TYPES } from './configs'; export const Banner = ({ active, bannerContext, - testId, + kjbElementId, ...rest }) => ( (bannerContext !== null) @@ -25,7 +25,7 @@ Banner.defaultProps = { dismissable: true, link: null, onDismiss: null, - testId: null, + kjbElementId: null, text: null, type: Banner.TYPES.DEFAULT, }; @@ -41,7 +41,7 @@ Banner.propTypes = { target: PropTypes.string }), onDismiss: PropTypes.func, - testId: PropTypes.string, + kjbElementId: PropTypes.string, text: PropTypes.string, type: PropTypes.oneOf(Object.values(BANNER_TYPES)), }; diff --git a/packages/sage-react/lib/Breadcrumbs/Breadcrumbs.jsx b/packages/sage-react/lib/Breadcrumbs/Breadcrumbs.jsx index fcf9fcd94f..bfc3d9963c 100644 --- a/packages/sage-react/lib/Breadcrumbs/Breadcrumbs.jsx +++ b/packages/sage-react/lib/Breadcrumbs/Breadcrumbs.jsx @@ -11,7 +11,7 @@ export const Breadcrumbs = ({ icon, isProgressbar, items, - testId, + kjbElementId, ...rest }) => { const classNames = classnames( @@ -39,7 +39,7 @@ export const Breadcrumbs = ({ className={`sage-breadcrumbs__link ${isCurrent && 'sage-breadcrumbs__link--current'}`} suppressDefaultClass={true} tag={linkTag} - testId="breadcrumbListItem" + kjbElementId="breadcrumbListItem" {...otherProps} > {(icon && items.length === 1 && i === 0) && ( @@ -61,7 +61,7 @@ export const Breadcrumbs = ({