mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-26 22:11:20 -07:00
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
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:
@@ -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]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user