feat: show plugin features from the manifest on the plugin page

This commit is contained in:
LukeGus committed 2026-10-06 22:38:13 -05:00
1 parent 60024bdd4e
commit b6bb3ffc73
13 files changed
+158 -2

No files matched your search

+16
View File
@@ -92,6 +92,18 @@ describe("mergePlugins", () => {
});
});
it("uses the installed features and falls back to the registry", () => {
const registry = entry({ features: ["From registry"] });
expect(
mergePlugins([summary({ features: ["Installed"] })], [registry])[0]
.features,
).toEqual(["Installed"]);
expect(mergePlugins([summary()], [registry])[0].features).toEqual([
"From registry",
]);
expect(mergePlugins([summary()], null)[0].features).toEqual([]);
});
it("keeps installed plugins when the registry is unreachable", () => {
const rows = mergePlugins([summary()], null);
expect(rows).toHaveLength(1);
@@ -120,6 +132,7 @@ describe("sorting and filtering", () => {
name: "Alpha",
category: "Access",
description: "Sign in",
features: ["Works with Podman"],
versions: [
{
version: "1.0.0",
@@ -143,6 +156,9 @@ describe("sorting and filtering", () => {
expect(
rows.filter((r) => matchesQuery(r, "sign")).map((r) => r.id),
).toEqual(["a"]);
expect(
rows.filter((r) => matchesQuery(r, "podman")).map((r) => r.id),
).toEqual(["a"]);
expect(rows.filter((r) => matchesQuery(r, " ")).length).toBe(2);
});