diff --git a/tests/e2e/project/patches.spec.ts b/tests/e2e/project/patches.spec.ts index 4e536cea2..832da8340 100644 --- a/tests/e2e/project/patches.spec.ts +++ b/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(); diff --git a/tests/support/fixtures.ts b/tests/support/fixtures.ts index e75741662..ed12816b9 100644 --- a/tests/support/fixtures.ts +++ b/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,