Fix tests
This commit is contained in:
@ -9,6 +9,7 @@ export type LightIconButtonSize = 'small' | 'medium';
|
||||
|
||||
export type LightIconButtonProps = {
|
||||
className?: string;
|
||||
testId?: string;
|
||||
Icon?: IconComponent;
|
||||
title?: string;
|
||||
size?: LightIconButtonSize;
|
||||
@ -81,6 +82,7 @@ const StyledButton = styled.button<
|
||||
export const LightIconButton = ({
|
||||
'aria-label': ariaLabel,
|
||||
className,
|
||||
testId,
|
||||
Icon,
|
||||
active = false,
|
||||
size = 'small',
|
||||
@ -92,6 +94,7 @@ export const LightIconButton = ({
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<StyledButton
|
||||
data-testid={testId}
|
||||
aria-label={ariaLabel}
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
|
||||
@ -44,6 +44,7 @@ export const DropdownMenuHeader = ({
|
||||
<StyledHeader {...props}>
|
||||
{StartIcon && (
|
||||
<LightIconButton
|
||||
data-testid="dropdown-menu-header-end-icon"
|
||||
Icon={StartIcon}
|
||||
onClick={onClick}
|
||||
accent="tertiary"
|
||||
@ -53,6 +54,7 @@ export const DropdownMenuHeader = ({
|
||||
<StyledChildrenWrapper>{children}</StyledChildrenWrapper>
|
||||
{EndIcon && (
|
||||
<StyledLightIconButton
|
||||
testId="dropdown-menu-header-end-icon"
|
||||
Icon={EndIcon}
|
||||
onClick={onClick}
|
||||
accent="tertiary"
|
||||
|
||||
@ -49,11 +49,15 @@ export const AddCompanyFromHeader: Story = {
|
||||
await canvas.findByTestId('company-progress-dropdown-menu'),
|
||||
);
|
||||
|
||||
const pipelineStageButton = await canvas.findByTestId(
|
||||
const pipelineStageDropdownHeader = await canvas.findByTestId(
|
||||
'selected-pipeline-stage',
|
||||
);
|
||||
|
||||
await pipelineStageButton.click();
|
||||
const pipelineStageDropdownUnfoldButton = await within(
|
||||
pipelineStageDropdownHeader,
|
||||
).findByTestId('dropdown-menu-header-end-icon');
|
||||
|
||||
await pipelineStageDropdownUnfoldButton.click();
|
||||
|
||||
const menuItem1 = await canvas.findByTestId('select-pipeline-stage-1');
|
||||
|
||||
@ -67,11 +71,15 @@ export const AddCompanyFromHeader: Story = {
|
||||
await canvas.findByTestId('company-progress-dropdown-menu'),
|
||||
);
|
||||
|
||||
const pipelineStageButton = await canvas.findByTestId(
|
||||
const pipelineStageDropdownHeader = await canvas.findByTestId(
|
||||
'selected-pipeline-stage',
|
||||
);
|
||||
|
||||
await pipelineStageButton.click();
|
||||
const pipelineStageDropdownUnfoldButton = await within(
|
||||
pipelineStageDropdownHeader,
|
||||
).findByTestId('dropdown-menu-header-end-icon');
|
||||
|
||||
await pipelineStageDropdownUnfoldButton.click();
|
||||
|
||||
const menuItem1 = await canvas.findByTestId('select-pipeline-stage-1');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user