Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Fix `radicle-httpd` tests for radicle 1.1.0
Sebastian Martinez committed 1 year ago
commit f456731f42a21017a48153d174117d9c0c907127
parent be0ecd7
5 files changed +8 -9
modified radicle-httpd/build/Dockerfile
@@ -35,7 +35,7 @@ RUN curl -sSf -o zig.tar.xz https://ziglang.org/download/0.12.0/zig-linu
    xz -d -c zig.tar.xz | tar -x && \
    mv zig-linux-x86_64-0.12.0/zig /usr/bin/zig && \
    mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig && \
-
    cargo install cargo-zigbuild@0.18.3
+
    cargo install cargo-zigbuild@0.18.3 --locked


# Parts of the macOS SDK are required to build Radicle, we make these available
modified radicle-httpd/src/api.rs
@@ -65,10 +65,9 @@ impl Context {

        let payloads: BTreeMap<PayloadId, Value> = doc
            .payload()
-
            .clone()
-
            .into_iter()
+
            .iter()
            .filter_map(|(id, payload)| {
-
                if id == PayloadId::project() {
+
                if id == &PayloadId::project() {
                    let (_, head) = repo.head().ok()?;
                    let patches = self.profile.patches(repo).ok()?;
                    let patches = patches.counts().ok()?;
@@ -76,7 +75,7 @@ impl Context {
                    let issues = issues.counts().ok()?;

                    Some((
-
                        id,
+
                        id.clone(),
                        json!({
                            "data": payload,
                            "meta": {
@@ -87,7 +86,7 @@ impl Context {
                        }),
                    ))
                } else {
-
                    Some((id, json!({ "data": payload })))
+
                    Some((id.clone(), json!({ "data": payload })))
                }
            })
            .collect();
modified tests/e2e/node.spec.ts
@@ -22,7 +22,7 @@ test("node metadata", async ({ page, peerManager }) => {
  await page.goto(peer.uiUrl());

  await expect(page.getByText(shortNodeRemote).first()).toBeVisible();
-
  await expect(page.getByText("/radicle:1.0.0/")).toBeVisible();
+
  await expect(page.getByText("/radicle:1.1.0-pre.4/")).toBeVisible();
});

test("node repos", async ({ page }) => {
modified tests/support/heartwood-release
@@ -1 +1 @@
-
1.0.0

\ No newline at end of file
+
1.1.0-pre.4

\ No newline at end of file
modified tests/support/radicle-httpd-release
@@ -1 +1 @@
-
0.17.0

\ No newline at end of file
+
0.18.0-pre

\ No newline at end of file