diff --git a/explorer/http-client/tests/release.test.ts b/explorer/http-client/tests/release.test.ts index 952bb4346..610f0d907 100644 --- a/explorer/http-client/tests/release.test.ts +++ b/explorer/http-client/tests/release.test.ts @@ -4,13 +4,11 @@ import { describe, expect } from "vitest"; import { testFixture } from "@http-client/tests/support/fixtures.js"; import { createRepo } from "@tests/support/repo.js"; -import { useLocalHttpd } from "@tests/support/support.js"; describe("release", () => { - // The release read API only exists in the local httpd build, so skip these - // against the stable pre-built binary the default suite runs. Releases are - // seeded on an isolated peer to avoid perturbing the shared fixtures. - testFixture.skipIf(!useLocalHttpd)( + // Releases are seeded on an isolated peer to avoid perturbing the shared + // fixtures. + testFixture( "#getAllReleases(rid) + #getReleaseById(rid, id)", async ({ httpd: { api, peer } }) => { const { rid, repoFolder } = await createRepo(peer, { diff --git a/explorer/tests/e2e/repo/release.spec.ts b/explorer/tests/e2e/repo/release.spec.ts index 0b8fca879..04deb11b7 100644 --- a/explorer/tests/e2e/repo/release.spec.ts +++ b/explorer/tests/e2e/repo/release.spec.ts @@ -6,10 +6,8 @@ import { registerArtifact, syncFrom, } from "@tests/support/repo.js"; -import { releaseApiOnlyLocal, useLocalHttpd } from "@tests/support/support.js"; test.describe(() => { - test.skip(!useLocalHttpd, releaseApiOnlyLocal); // Release fixtures need several rad-artifact commands, which takes longer // than the default per-test budget. test.describe.configure({ timeout: 30_000 }); diff --git a/explorer/tests/e2e/repo/releases.spec.ts b/explorer/tests/e2e/repo/releases.spec.ts index edbd6dd6d..1f35bbf08 100644 --- a/explorer/tests/e2e/repo/releases.spec.ts +++ b/explorer/tests/e2e/repo/releases.spec.ts @@ -1,4 +1,4 @@ -import { test, cobUrl, expect } from "@tests/support/fixtures.js"; +import { test, cobRid, cobUrl, expect } from "@tests/support/fixtures.js"; import { createContributor, createRepo, @@ -6,10 +6,8 @@ import { registerArtifact, syncFrom, } from "@tests/support/repo.js"; -import { releaseApiOnlyLocal, useLocalHttpd } from "@tests/support/support.js"; test.describe(() => { - test.skip(!useLocalHttpd, releaseApiOnlyLocal); // Release fixtures need several rad-artifact commands, which takes longer // than the default per-test budget. test.describe.configure({ timeout: 30_000 }); @@ -106,7 +104,13 @@ test.describe(() => { }); test("releases are unavailable on older nodes", async ({ page }) => { - test.skip(useLocalHttpd, "older nodes are the pre-built httpd release"); + // Older nodes don't report a release count. + await page.route(`**/api/v1/repos/${cobRid}`, async route => { + const response = await route.fetch(); + const json = await response.json(); + delete json.payloads["xyz.radicle.project"].meta.releases; + await route.fulfill({ response, json }); + }); await page.goto(cobUrl); await expect(page.getByRole("link", { name: /^Releases/ })).toBeHidden(); diff --git a/explorer/tests/support/support.ts b/explorer/tests/support/support.ts index e864f501d..62d09ef1f 100644 --- a/explorer/tests/support/support.ts +++ b/explorer/tests/support/support.ts @@ -39,9 +39,6 @@ export const radicleArtifactRelease = ( export const useLocalHttpd = process.env.USE_LOCAL_HTTPD === "true"; -export const releaseApiOnlyLocal = - "the release read API only exists in the local httpd build"; - // Assert that binaries are installed and are the correct version. export async function assertBinariesInstalled( binary: string,