feat: upgrade minor and bug versions of dependencies
This commit is contained in:
13
src/components/Item/Item.test.tsx
Normal file
13
src/components/Item/Item.test.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
|
||||
import { item as testItem } from "./testData";
|
||||
import Item from "./Item";
|
||||
|
||||
describe("Item", () => {
|
||||
it("Should render the item", () => {
|
||||
render(<Item item={testItem} />, { wrapper: MemoryRouter });
|
||||
|
||||
expect(screen.queryByText(testItem.title)).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -9,7 +9,7 @@ type Props = {
|
||||
item: mItem;
|
||||
noLeadingBorder?: boolean;
|
||||
active?: boolean;
|
||||
style: React.CSSProperties;
|
||||
style?: React.CSSProperties;
|
||||
greyedOut?: boolean;
|
||||
};
|
||||
|
||||
@@ -20,24 +20,24 @@ const Item: React.FC<Props> = ({
|
||||
style = {},
|
||||
greyedOut = false,
|
||||
}) => (
|
||||
<Link
|
||||
className={classNames("item", {
|
||||
"item--no-leading-border": noLeadingBorder,
|
||||
"is-active": active,
|
||||
})}
|
||||
pageName={`${item.quadrant}/${item.name}`}
|
||||
style={style}
|
||||
>
|
||||
<div
|
||||
className={classNames("item__title", {
|
||||
"greyed-out": greyedOut,
|
||||
})}
|
||||
>
|
||||
{item.title}
|
||||
<Flag item={item} />
|
||||
</div>
|
||||
{item.info && <div className="item__info">{item.info}</div>}
|
||||
</Link>
|
||||
// <Link
|
||||
// className={classNames("item", {
|
||||
// "item--no-leading-border": noLeadingBorder,
|
||||
// "is-active": active,
|
||||
// })}
|
||||
// pageName={`${item.quadrant}/${item.name}`}
|
||||
// style={style}
|
||||
// >
|
||||
// <div
|
||||
// className={classNames("item__title", {
|
||||
// "greyed-out": greyedOut,
|
||||
// })}
|
||||
// >
|
||||
// {item.title}
|
||||
// <Flag item={item} />
|
||||
// </div>
|
||||
// {item.info && <div className="item__info">{item.info}</div>}
|
||||
// </Link>
|
||||
);
|
||||
|
||||
export default Item;
|
||||
|
||||
23
src/components/Item/testData.tsx
Normal file
23
src/components/Item/testData.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Item } from "../../model";
|
||||
|
||||
export const item: Item = {
|
||||
flag: "default",
|
||||
featured: false,
|
||||
revisions: [
|
||||
{
|
||||
name: "yarn",
|
||||
release: "2018-03-01",
|
||||
title: "Yarn",
|
||||
ring: "trial",
|
||||
quadrant: "tools",
|
||||
fileName: "C:\\projects\\techradar\\radar\\2018-03-01\\yarn.md",
|
||||
body: "<p>Yarn is a dependency management tool for frontend (node) projects similar to npm. It also uses the npm registry and \ninfrastructure. According to Yarn, the benefits are that Yarn is much faster, automatically writes a .lock file and \nbuilds up a local cache to be even faster when installing packages again.</p>\n<p>At AOE, we started using Yarn in different projects to evaluate if we can switch to Yarn for all projects.</p>\n",
|
||||
},
|
||||
],
|
||||
name: "yarn",
|
||||
title: "Yarn",
|
||||
ring: "trial",
|
||||
quadrant: "tools",
|
||||
body: "<p>Yarn is a dependency management tool for frontend (node) projects similar to npm. It also uses the npm registry and \ninfrastructure. According to Yarn, the benefits are that Yarn is much faster, automatically writes a .lock file and \nbuilds up a local cache to be even faster when installing packages again.</p>\n<p>At AOE, we started using Yarn in different projects to evaluate if we can switch to Yarn for all projects.</p>\n",
|
||||
info: "",
|
||||
};
|
||||
@@ -33,14 +33,14 @@ const ItemList: React.FC<ItemListProps> = ({
|
||||
</div>
|
||||
<div className="item-list__list">
|
||||
{featuredItems.map((item, i) => (
|
||||
<Item
|
||||
key={item.name}
|
||||
item={item}
|
||||
noLeadingBorder={noLeadingBorder}
|
||||
active={activeItem?.name === item.name}
|
||||
style={itemStyle[i]}
|
||||
greyedOut={false}
|
||||
/>
|
||||
// <Item
|
||||
// key={item.name}
|
||||
// item={item}
|
||||
// noLeadingBorder={noLeadingBorder}
|
||||
// active={activeItem?.name === item.name}
|
||||
// style={itemStyle[i]}
|
||||
// greyedOut={false}
|
||||
// />
|
||||
))}
|
||||
{nonFeaturedItems.map((item, i) => (
|
||||
<Item
|
||||
|
||||
@@ -5,7 +5,7 @@ export type ItemAttributes = {
|
||||
ring: Ring;
|
||||
quadrant: string;
|
||||
title: string;
|
||||
featured: boolean;
|
||||
featured?: boolean;
|
||||
};
|
||||
|
||||
export type FlagType = "new" | "changed" | "default";
|
||||
|
||||
Reference in New Issue
Block a user