Skip to content

Commit

Permalink
Add test case for default divider
Browse files Browse the repository at this point in the history
  • Loading branch information
ektaghag-eaton committed Sep 15, 2023
1 parent c5a4536 commit d0fa294
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions login-workflow/src/components/WorkflowCard/Workflow.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ describe('WorkflowCardInstructions tests', () => {
render(<WorkflowCardInstructions instructions="Test" divider={true} />);
expect(screen.getByText('Test')).toBeInTheDocument();
});

it('renders with divider', () => {
const {container} = render(<WorkflowCardInstructions instructions="Test" />);
expect(screen.getByText('Test')).toBeInTheDocument();
expect(container.getElementsByClassName('MuiDivider-root').length).toBe(1);
});
});

describe('ErrorState tests', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type WorkflowCardInstructionProps = TypographyProps & {

/**
* Whether or not to show a divider below the instructions
* @default true
*/
divider?: boolean;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const ContactSupportScreen: React.FC<ContactSupportScreenProps> = (props)
contactPhone = '1-800-123-4567',
dismissButtonLabel = t('bluiCommon:ACTIONS.OKAY'),
onDismiss,
WorkflowCardBaseProps,
WorkflowCardInstructionProps,
WorkflowCardHeaderProps,
WorkflowCardActionsProps,
...otherContactSupportProps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export const ExistingAccountSuccessScreen: React.FC<SuccessScreenProps> = (props
onDismiss = (): void => navigate(routeConfig.LOGIN),
WorkflowCardHeaderProps,
WorkflowCardActionsProps,
WorkflowCardBaseProps,
WorkflowCardInstructionProps,
...otherExistingAccountSuccessScreenProps
} = props;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ export const RegistrationSuccessScreen: React.FC<SuccessScreenProps> = (props) =
canDismiss = true,
WorkflowCardHeaderProps,
WorkflowCardActionsProps,
WorkflowCardBaseProps,
WorkflowCardInstructionProps,
...otherRegistrationSuccessScreenProps
} = props;

Expand Down

0 comments on commit d0fa294

Please sign in to comment.