Feature: feeds widget (#7170)
Docker CI / Docker Build & Push (push) Canceled after 0s
Lint / Linting Checks (push) Canceled after 0s
Release Drafter / Update Release Draft (push) Canceled after 0s
Release Drafter / Auto Label PR (push) Canceled after 0s
Tests / vitest (1) (push) Canceled after 0s
Tests / vitest (2) (push) Canceled after 0s
Tests / vitest (3) (push) Canceled after 0s
Tests / vitest (4) (push) Canceled after 0s

This commit is contained in:
shamoon
2026-09-24 21:47:15 -07:00
committed by GitHub
parent 83d7fe2556
commit 18a5c4ad73
21 changed files with 848 additions and 0 deletions
+32
View File
@@ -524,6 +524,38 @@ describe("utils/config/service-helpers", () => {
]);
});
it("cleanServiceGroups keeps feed layout and drops server-side options", async () => {
const mod = await import("./service-helpers");
const { cleanServiceGroups } = mod;
const rawGroups = [
{
name: "Core",
services: [
{
name: "News",
widgets: [
{
type: "feed",
url: "https://example.com/feed.xml?token=secret",
maxItems: 3,
images: false,
layout: "grid",
},
],
},
],
groups: [],
},
];
const feedWidget = cleanServiceGroups(rawGroups)[0].services[0].widgets[0];
expect(feedWidget).toEqual(expect.objectContaining({ type: "feed", layout: "grid" }));
expect(feedWidget).not.toHaveProperty("url");
expect(feedWidget).not.toHaveProperty("maxItems");
expect(feedWidget).not.toHaveProperty("images");
});
it("findGroupByName deep-searches and annotates parent", async () => {
const mod = await import("./service-helpers");
const { findGroupByName } = mod;