Change: use status field as primary queue detail (#6859)
Docker CI / Docker Build & Push (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled

This commit is contained in:
shamoon
2026-07-10 22:48:22 -07:00
committed by GitHub
parent 4755388112
commit 9b1726be9c
8 changed files with 174 additions and 47 deletions
+26 -1
View File
@@ -1,4 +1,4 @@
import { describe, it } from "vitest";
import { describe, expect, it } from "vitest";
import { expectWidgetConfigShape } from "test-utils/widget-config";
@@ -8,4 +8,29 @@ describe("radarr widget config", () => {
it("exports a valid widget config", () => {
expectWidgetConfigShape(widget);
});
it("sorts active downloads ahead of queued downloads", () => {
const queue = widget.mappings["queue/details"].map(
Buffer.from(
JSON.stringify([
{
movieId: 1,
status: "queued",
trackedDownloadState: "downloading",
size: 0,
sizeleft: 0,
},
{
movieId: 2,
status: "downloading",
trackedDownloadState: "downloading",
size: 100,
sizeleft: 50,
},
]),
),
);
expect(queue.map((entry) => entry.movieId)).toEqual([2, 1]);
});
});