Skip to content

Commit

Permalink
test(suite): fix failing cypress E2E
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemonexe committed Sep 24, 2024
1 parent 2e881d8 commit 351a5fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/components/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type CommonCardProps = AccessibilityProps & {
className?: string;
label?: ReactNode;
forceElevation?: Elevation;
'data-testid'?: string;
};

export type CardPropsWithTransientProps = CommonCardProps & TransientProps<AllowedFrameProps>;
Expand All @@ -134,6 +135,7 @@ const CardComponent = forwardRef<
onMouseLeave,
className,
tabIndex,
'data-testid': dataTest,
...rest
},
ref,
Expand All @@ -152,6 +154,7 @@ const CardComponent = forwardRef<
onMouseLeave={onMouseLeave}
{...withAccessibilityProps({ tabIndex })}
{...rest}
data-testid={dataTest}
>
<ElevationContext baseElevation={elevation}>{children}</ElevationContext>
</CardContainer>
Expand All @@ -170,6 +173,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(
className,
tabIndex,
children,
'data-testid': dataTest,
...rest
},
ref,
Expand All @@ -182,6 +186,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(
tabIndex,
$paddingType: paddingType,
children,
'data-testid': dataTest,
};
const frameProps = pickAndPrepareFrameProps(rest, allowedCardFrameProps);

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/NewModal/NewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ interface NewModalProps {
icon?: IconName;
alignment?: NewModalAlignment;
size?: NewModalSize;
'data-test'?: string;
'data-testid'?: string;
}

const NewModalBase = ({
Expand All @@ -127,7 +127,7 @@ const NewModalBase = ({
icon,
onBackClick,
onCancel,
'data-test': dataTest = '@modal',
'data-testid': dataTest = '@modal',
}: NewModalProps) => {
const { scrollElementRef, onScroll, ShadowContainer, ShadowTop, ShadowBottom } =
useScrollShadow();
Expand Down

0 comments on commit 351a5fc

Please sign in to comment.