Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix assignee and peer switching e2e tests
Sebastian Martinez committed 2 years ago
commit 6cfa0d0555a22b02eebadbef6ddff8704018f159
parent 2b318e50025176644010d248448f8af46cbe3369
3 files changed +9 -5
modified src/views/projects/Cob/AssigneeInput.svelte
@@ -33,7 +33,7 @@
      const parsedNodeId = parseNodeId(inputValue);
      if (parsedNodeId) {
        assignee = `${parsedNodeId.prefix}${parsedNodeId.pubkey}`;
-
        if (!updatedAssignees.find(({ id }) => id === assignee)) {
+
        if (updatedAssignees.find(({ id }) => id === assignee)) {
          valid = false;
          validationMessage = "This assignee is already added";
        } else {
modified src/views/projects/Patch.svelte
@@ -220,7 +220,9 @@
          revision: revisionId,
          comment: commentId,
          reaction,
-
          active: Boolean(authors.find(({ id }) => id === session.publicKey)),
+
          active: !authors.find(
+
            ({ id }) => utils.parseNodeId(id)?.pubkey === session.publicKey,
+
          ),
        },
        session.id,
      );
@@ -378,7 +380,9 @@
          type: "revision.react",
          revision: revisionId,
          reaction,
-
          active: Boolean(authors.find(({ id }) => id === session.publicKey)),
+
          active: !authors.find(
+
            ({ id }) => utils.parseNodeId(id)?.pubkey === session.publicKey,
+
          ),
        },
        session.id,
      );
modified tests/e2e/project.spec.ts
@@ -294,7 +294,7 @@ test("peer and branch switching", async ({ page }) => {
      );
      await expect(
        page.getByRole("link", {
-
          name: "Commits 6",
+
          name: "Commits 7",
        }),
      ).toBeVisible();
    }
@@ -363,7 +363,7 @@ test("peer and branch switching", async ({ page }) => {
      );
      await expect(
        page.getByRole("link", {
-
          name: "Commits 7",
+
          name: "Commits 8",
        }),
      ).toBeVisible();
      await expect(