fix(workshop): simplify GitHub identities

This commit is contained in:
Thomas Camlong committed 2026-08-10 15:14:32 +02:00
1 parent 015e0cbf63
commit 64403079d8
19 files changed
+114 -362

No files matched your search

+8 -1
View File
@@ -3,6 +3,8 @@ import { describe, expect, test } from "vitest";
import { CUSTOM_WIDGET_STARTER } from "@homarr/custom-widgets/core";
import {
githubAvatarUrl,
githubProfileUrl,
normalizeHttpUrl,
resolveHomarrUrlConfig,
validateWorkshopWidget,
@@ -11,6 +13,11 @@ import {
} from "./schema";
describe("Workshop URL configuration", () => {
test("derives GitHub identity URLs from the stored username", () => {
expect(githubProfileUrl("octocat")).toBe("https://github.com/octocat");
expect(githubAvatarUrl("octocat")).toBe("https://github.com/octocat.png");
});
test("normalizes the URL contract and derives Workshop defaults", () => {
expect(
resolveHomarrUrlConfig({
@@ -98,7 +105,7 @@ describe("Workshop widget validation", () => {
expect(result.type).toBe("customWidget");
expect(result.screenshots).toEqual([]);
expect(result.authorName).toBe("Community member");
expect(result.authorGithubUsername).toBe("");
expect(result.upvotes).toBe(0);
});