Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add more comments and replies and a rejected review to the test fixtures
Sebastian Martinez committed 2 years ago
commit e0261fe69e0b897389f897fb3733ee327f688e3b
parent d91591c90860a7319aab94297858b1c1d322573c
2 files changed +43 -5
modified tests/e2e/project/patches.spec.ts
@@ -8,7 +8,7 @@ test("navigate listing", async ({ page }) => {
  await page.locator('role=link[name="1 merged"]').click();
  await expect(page).toHaveURL(`${cobUrl}/patches?state=merged`);
  await expect(
-
    page.locator(".comments").filter({ hasText: "2" }),
+
    page.locator(".comments").filter({ hasText: "5" }),
  ).toBeVisible();
});

@@ -52,7 +52,7 @@ test("use revision selector", async ({ page }) => {
  ).toHaveText("Add more text");

  // Switching to the initial revision
-
  await page.getByText("Revision 5140fb2").click();
+
  await page.getByText("Revision 2592b1e").click();
  await expect(page.locator(".dropdown")).toBeVisible();
  await page.getByRole("link", { name: "Revision 0f3697f" }).click();
  await expect(page.locator(".dropdown")).toBeHidden();
modified tests/support/fixtures.ts
@@ -430,14 +430,40 @@ export async function createCobsFixture(peer: RadiclePeer) {
    createOptions(projectFolder, 2),
  );
  await peer.rad(
-
    ["review", patchOne, "-m", "LGTM", "--accept"],
+
    [
+
      "comment",
+
      patchOne,
+
      "--message",
+
      "Yeah no problem!",
+
      "--reply-to",
+
      commentPatchOne,
+
    ],
    createOptions(projectFolder, 3),
  );
+
  const { stdout: commentTwo } = await peer.rad(
+
    ["comment", patchOne, "--message", "Looking good so far"],
+
    createOptions(projectFolder, 4),
+
  );
+
  await peer.rad(
+
    [
+
      "comment",
+
      patchOne,
+
      "--message",
+
      "Thanks again!",
+
      "--reply-to",
+
      commentTwo,
+
    ],
+
    createOptions(projectFolder, 5),
+
  );
+
  await peer.rad(
+
    ["review", patchOne, "-m", "LGTM", "--accept"],
+
    createOptions(projectFolder, 6),
+
  );
  await patch.merge(
    peer,
    defaultBranch,
    "feature/add-readme",
-
    createOptions(projectFolder, 4),
+
    createOptions(projectFolder, 7),
  );

  const patchTwo = await patch.create(
@@ -482,9 +508,21 @@ export async function createCobsFixture(peer: RadiclePeer) {
  await peer.git(["add", "."], { cwd: projectFolder });
  await peer.git(["commit", "-m", "Add more text"], { cwd: projectFolder });
  await peer.git(
-
    ["push", "rad", "feature/better-subtitle"],
+
    [
+
      "push",
+
      "-o",
+
      "patch.message=Most of the missing README text was caused by the git-daemon not having a writers block. It seems like using an RNG was not a good enough solution.",
+
      "-o",
+
      "patch.message=After this change, the README seem to be written correctly",
+
      "rad",
+
      "feature/better-subtitle",
+
    ],
    createOptions(projectFolder, 3),
  );
+
  await peer.rad(
+
    ["review", patchThree, "-m", "No this doesn't look better", "--reject"],
+
    createOptions(projectFolder, 2),
+
  );

  const patchFour = await patch.create(
    peer,