Skip to content

Commit

Permalink
chore(PPDSC-2369): fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoyan Delev committed Aug 23, 2022
1 parent 41236e2 commit 5b1373a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion site/components/media-list/media-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export const MediaList: React.FC<MediaListProps> = ({
);

return (
<Cell {...cellColumnList}>
// eslint-disable-next-line react/no-array-index-key
<Cell {...cellColumnList} key={`index-${index}`}>
{cardProps.href && (
<LinkNext href={cardProps.href} passHref>
{styledCardComponentWithProps}
Expand Down
5 changes: 4 additions & 1 deletion src/menu/__tests__/menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {MenuItemAlign, MenuItemSize} from '../types';
import {styled, getColorCssFromTheme} from '../../utils';
import {getSSRId} from '../../utils/get-ssr-id';
import {createCustomThemeWithBaseThemeSwitch} from '../../test/theme-select-object';
import {LinkInline} from '../../link';

// eslint-disable-next-line no-script-url
const href = 'javascript:;';
Expand Down Expand Up @@ -246,7 +247,9 @@ export const StoryMenuItemsStates = () => (
<StorybookHeading>Menu items - states</StorybookHeading>
<StorybookSubHeading>Menu items horizontal</StorybookSubHeading>
<Menu aria-label={`Menu ${getSSRId()}`}>
<MenuItem href={href}>Menu item 1</MenuItem>
<MenuItem href="" as="div">
<LinkInline href="/">Menu item as div</LinkInline>
</MenuItem>
<MenuItem href={href} selected>
Menu item 2
</MenuItem>
Expand Down

0 comments on commit 5b1373a

Please sign in to comment.