feat(onboarding): polish setup experience

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 01:20:27 +02:00
1 parent f4891447d3
commit 4ca02a9133
34 files changed
+1005 -1172

No files matched your search

@@ -1,6 +1,12 @@
import { describe, expect, it } from "vitest";
import { isHttpUrl, normalizeServiceUrl, resolveDiscoveredAppUrl, takeNewSourceIds } from "./discovery-selection";
import {
isHttpUrl,
normalizeServiceUrl,
resolveDiscoveredAppUrl,
resolveIntegrationDraftUrl,
takeNewSourceIds,
} from "./discovery-selection";
describe("takeNewSourceIds", () => {
it("keeps same-kind service instances independent and does not reselect them after refresh", () => {
@@ -22,6 +28,25 @@ describe("takeNewSourceIds", () => {
expect(resolveDiscoveredAppUrl(undefined, null, null)).toBe("");
});
it("regenerates integration URLs from the usual server address without replacing manual edits", () => {
expect(
resolveIntegrationDraftUrl({
currentUrl: "http://docker-host:8989",
overridden: false,
serverUrl: "http://home.lan:8989",
fallbackUrl: "http://docker-host:8989",
}),
).toBe("http://home.lan:8989");
expect(
resolveIntegrationDraftUrl({
currentUrl: "https://sonarr.custom.example",
overridden: true,
serverUrl: "http://home.lan:8989",
fallbackUrl: "http://docker-host:8989",
}),
).toBe("https://sonarr.custom.example");
});
it("normalizes HTTP, HTTPS, and bare self-hosted service addresses", () => {
expect(isHttpUrl("http://home.lan:8989")).toBe(true);
expect(isHttpUrl("https://home.example/sonarr")).toBe(true);