Fix assignee and peer switching e2e tests

This commit is contained in:
Sebastian Martinez
2024-03-11 20:18:43 +01:00
parent 2b318e5002
commit 6cfa0d0555
3 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -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 {
+6 -2
View File
@@ -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,
);
+2 -2
View File
@@ -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(