Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(web): update Linux download helper expectations

Richie McIlroy4f0f8f481836
diff --git a/apps/web/__tests__/unit/platform-downloads.test.ts b/apps/web/__tests__/unit/platform-downloads.test.ts
index ce6185301..e97e9e52e 100644
--- a/apps/web/__tests__/unit/platform-downloads.test.ts
+++ b/apps/web/__tests__/unit/platform-downloads.test.ts
@@ -6,10 +6,10 @@ import {
} from "@/utils/platform";
describe("download platform helpers", () => {
- it("routes Linux users to the Linux AppImage download", () => {
- expect(getDownloadUrl("linux", false)).toBe("/download/linux");
+ it("routes Linux users to the Linux deb download", () => {
+ expect(getDownloadUrl("linux", false)).toBe("/download/linux-deb");
expect(getDownloadButtonText("linux", false)).toBe("Download for free");
- expect(getVersionText("linux")).toBe("Linux x86_64 AppImage recommended");
+ expect(getVersionText("linux")).toBe("Linux x86_64 .deb recommended");
});
it("keeps existing macOS and Windows download routing", () => {
diff --git a/apps/web/__tests__/unit/releases-downloads.test.ts b/apps/web/__tests__/unit/releases-downloads.test.ts
index 1e08aaecf..ea8ffa51a 100644
--- a/apps/web/__tests__/unit/releases-downloads.test.ts
+++ b/apps/web/__tests__/unit/releases-downloads.test.ts
@@ -6,23 +6,23 @@ import {
} from "@/utils/releases";
describe("release downloads", () => {
- it("parses Linux release download URLs from the release body", () => {
+ it("parses supported release download URLs from the release body", () => {
const downloads = parseDownloadsFromBody(`
<!-- DOWNLOADS_JSON {"macos-arm64":"https://example.com/Cap.dmg","linux-appimage":"https://example.com/Cap.AppImage","linux-deb":"https://example.com/Cap.deb","linux-rpm":"https://example.com/Cap.rpm"} -->
`);
- expect(downloads["linux-appimage"]).toBe(
- "https://example.com/Cap.AppImage",
- );
+ expect(downloads["macos-arm64"]).toBe("https://example.com/Cap.dmg");
expect(downloads["linux-deb"]).toBe("https://example.com/Cap.deb");
- expect(downloads["linux-rpm"]).toBe("https://example.com/Cap.rpm");
expect(hasDownloads(downloads)).toBe(true);
});
- it("treats Linux-only release metadata as downloadable", () => {
- expect(
- hasDownloads({ "linux-appimage": "https://example.com/Cap.AppImage" }),
- ).toBe(true);
+ it("ignores unsupported Linux-only release metadata", () => {
+ const downloads = parseDownloadsFromBody(`
+ <!-- DOWNLOADS_JSON {"linux-appimage":"https://example.com/Cap.AppImage","linux-rpm":"https://example.com/Cap.rpm"} -->
+ `);
+
+ expect(downloads["linux-deb"]).toBeUndefined();
+ expect(hasDownloads(downloads)).toBe(false);
});
it("keeps the release download key list in platform order", () => {
@@ -30,9 +30,7 @@ describe("release downloads", () => {
"macos-arm64",
"macos-x64",
"windows",
- "linux-appimage",
"linux-deb",
- "linux-rpm",
]);
});
});