mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 11:50:42 +08:00
Add more comments and replies and a rejected review to the test fixtures
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user