Skip to content

Commit 9d54890

Browse files
committed
Removed console warning
1 parent e7204c4 commit 9d54890

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

packages/react-core/src/components/Wizard/Wizard.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ export const Wizard = ({
8585
isNoPlainOnGlass = false,
8686
...wrapperProps
8787
}: WizardProps) => {
88-
if (isPlain && isNoPlainOnGlass) {
89-
// eslint-disable-next-line no-console
90-
console.warn(
91-
`Wizard: When both isPlain and isNoPlainOnGlass are true, isPlain will take precedence and isNoPlainOnGlass will have no effect. It's recommended to pass only one prop according to the current theme.`
92-
);
93-
}
94-
9588
const [activeStepIndex, setActiveStepIndex] = useState(startIndex);
9689
const initialSteps = buildSteps(children);
9790
const firstStepRef = useRef(initialSteps[startIndex - 1]);

packages/react-core/src/components/Wizard/__tests__/Wizard.test.tsx

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -687,41 +687,3 @@ test(`Renders with ${styles.modifiers.noPlainOnGlass} class when isNoPlainOnGlas
687687

688688
expect(screen.getByTestId('wizard-no-plain')).toHaveClass(styles.modifiers.noPlainOnGlass);
689689
});
690-
691-
test('Does not log a warning when only isPlain is passed', () => {
692-
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();
693-
694-
render(
695-
<Wizard isPlain>
696-
<WizardStep id="test-step" name="Test step" />
697-
</Wizard>
698-
);
699-
700-
expect(consoleWarning).not.toHaveBeenCalled();
701-
});
702-
703-
test('Does not log a warning when only isNoPlainOnGlass is passed', () => {
704-
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();
705-
706-
render(
707-
<Wizard isNoPlainOnGlass>
708-
<WizardStep id="test-step" name="Test step" />
709-
</Wizard>
710-
);
711-
712-
expect(consoleWarning).not.toHaveBeenCalled();
713-
});
714-
715-
test('Logs a warning when both isPlain and isNoPlainOnGlass are passed', () => {
716-
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();
717-
718-
render(
719-
<Wizard isPlain isNoPlainOnGlass>
720-
<WizardStep id="test-step" name="Test step" />
721-
</Wizard>
722-
);
723-
724-
expect(consoleWarning).toHaveBeenCalledWith(
725-
`Wizard: When both isPlain and isNoPlainOnGlass are true, isPlain will take precedence and isNoPlainOnGlass will have no effect. It's recommended to pass only one prop according to the current theme.`
726-
);
727-
});

0 commit comments

Comments
 (0)