Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/statistics/expert-skills-statistics.data.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,48 @@ describe("expert-skills-statistics.data", () => {
"Software Development Lifecycle (SDLC)",
).icon,
).toBe("RefreshIcon");
expect(
getCategoryAppearance("unused-id", "DevOps and Automation").icon,
).toBe("CogIcon");
expect(
getCategoryAppearance("unused-id", "UX Design and Multimedia").icon,
).toBe("PencilAltIcon");
expect(getCategoryAppearance("unused-id", "Project Management").icon).toBe(
"ViewBoardsIcon",
);
});

it("gives each known category a unique icon", () => {
const names = [
"Programming and Development",
"Web Development",
"Networking and Telecommunications",
"Cybersecurity",
"Software Development Lifecycle (SDLC)",
"Cloud Computing",
"Operating Systems",
"DevOps and Automation",
"Data Analysis and Big Data",
"Virtualization",
"Databases and Data Warehousing",
"Mathematics and Statistics",
"Database Management",
"Geospatial Information Systems (GIS)",
"Machine Learning and AI",
"User Experience Design and Multimedia",
"Hardware and Systems Administration",
"Mobile App Development",
"Software Testing and Quality Assurance",
"Blockchain",
"IoT (Internet of Things)",
"Project Management",
"Scripting and Automation",
];
const icons = names.map(
(name) => getCategoryAppearance("unused-id", name).icon,
);

expect(new Set(icons).size).toBe(names.length);
});

it("hashes unknown categories by id so new catalog entries still render", () => {
Expand Down
13 changes: 9 additions & 4 deletions src/statistics/expert-skills-statistics.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ const CATEGORY_ICONS = [
"DeviceMobileIcon",
"ShareIcon",
"WifiIcon",
"ClipboardListIcon",
"ViewBoardsIcon",
"CodeIcon",
"CogIcon",
];

export type CategoryAppearance = {
Expand All @@ -76,12 +77,16 @@ const NAMED_CATEGORY_APPEARANCE: Array<[string[], CategoryAppearance]> = [
],
[["Cybersecurity"], { color: "#5B9BD5", icon: "ShieldCheckIcon" }],
[
["Software Development Lifecycle (SDLC)", "Software Development Lifecycle"],
[
"Software Development Lifecycle (SDLC)",
"Software Development Lifecycle",
"SDLC",
],
{ color: "#1A3D3D", icon: "RefreshIcon" },
],
[["Cloud Computing"], { color: "#2C4A6E", icon: "CloudIcon" }],
[["Operating Systems"], { color: "#3D7EA6", icon: "ChipIcon" }],
[["DevOps and Automation"], { color: "#2D4A3E", icon: "RefreshIcon" }],
[["DevOps and Automation"], { color: "#2D4A3E", icon: "CogIcon" }],
[["Data Analysis and Big Data"], { color: "#2C5F8A", icon: "ChartBarIcon" }],
[["Virtualization"], { color: "#3D7EA6", icon: "DuplicateIcon" }],
[
Expand Down Expand Up @@ -113,7 +118,7 @@ const NAMED_CATEGORY_APPEARANCE: Array<[string[], CategoryAppearance]> = [
],
[["Blockchain"], { color: "#2C4A6E", icon: "ShareIcon" }],
[["IoT (Internet of Things)"], { color: "#3D8B8F", icon: "WifiIcon" }],
[["Project Management"], { color: "#3D7EA6", icon: "ClipboardListIcon" }],
[["Project Management"], { color: "#3D7EA6", icon: "ViewBoardsIcon" }],
[["Scripting and Automation"], { color: "#5B9BD5", icon: "CodeIcon" }],
];

Expand Down
Loading