diff --git a/packages/react-core/src/components/Wizard/Wizard.tsx b/packages/react-core/src/components/Wizard/Wizard.tsx index 9e8c4cc3947..c66fe552b26 100644 --- a/packages/react-core/src/components/Wizard/Wizard.tsx +++ b/packages/react-core/src/components/Wizard/Wizard.tsx @@ -381,6 +381,7 @@ export class Wizard extends React.Component { return ( { return ( { = ({ @@ -34,6 +36,7 @@ export const WizardNavItem: React.FunctionComponent = ({ navItemComponent = 'button', href = null, isExpandable = false, + id, ...rest }: WizardNavItemProps) => { const NavItemComponent = navItemComponent; @@ -69,6 +72,7 @@ export const WizardNavItem: React.FunctionComponent = ({ (isExpandable ? setIsExpanded(!isExpanded || isCurrent) : onNavItemClick(step))} className={css( styles.wizardNavLink, diff --git a/packages/react-core/src/components/Wizard/__tests__/Wizard.test.tsx b/packages/react-core/src/components/Wizard/__tests__/Wizard.test.tsx index 991e9ad7841..c4d537993ac 100644 --- a/packages/react-core/src/components/Wizard/__tests__/Wizard.test.tsx +++ b/packages/react-core/src/components/Wizard/__tests__/Wizard.test.tsx @@ -5,24 +5,27 @@ import { Wizard, WizardStepFunctionType, WizardStep } from '../Wizard'; describe('Wizard', () => { test('Wizard should match snapshot', () => { const steps: WizardStep[] = [ - { name: 'A', component:

Step 1

}, + { name: 'A', id: "step-A", component:

Step 1

}, { name: 'B', + id: "step-B", steps: [ { name: 'B-1', + id: "step-B-1", component:

Step 2

, enableNext: true }, { name: 'B-2', + id: "step-B-2", component:

Step 3

, enableNext: false } ] }, - { name: 'C', component:

Step 4

}, - { name: 'D', component:

Step 5

} + { name: 'C', id: "step-C", component:

Step 4

}, + { name: 'D', id: "step-D", component:

Step 5

} ]; const onBack: WizardStepFunctionType = step => { // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/packages/react-core/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap b/packages/react-core/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap index 2978eef8191..9a9672aed93 100644 --- a/packages/react-core/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap +++ b/packages/react-core/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap @@ -351,6 +351,7 @@ exports[`Wizard Wizard should match snapshot 1`] = ` @@ -361,6 +362,7 @@ exports[`Wizard Wizard should match snapshot 1`] = ` @@ -373,6 +375,7 @@ exports[`Wizard Wizard should match snapshot 1`] = ` @@ -383,6 +386,7 @@ exports[`Wizard Wizard should match snapshot 1`] = ` @@ -395,6 +399,7 @@ exports[`Wizard Wizard should match snapshot 1`] = ` @@ -405,6 +410,7 @@ exports[`Wizard Wizard should match snapshot 1`] = `