mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-29 14:50:34 +08:00
Every write path gets a happy path and the contributor gets the permission cases the ADR asks for: labels, assignees, state, titles, comments, deleting, seeding by bare RID and clearing notifications.
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { createCollaborators } from "@tests/support/collaboration.js";
|
|
import {
|
|
expect,
|
|
test,
|
|
useBackend,
|
|
waitForCommand,
|
|
} from "@tests/support/fixtures.js";
|
|
import { createRepo } from "@tests/support/repo.js";
|
|
|
|
test("seeds a repo from the network by its bare RID", async ({
|
|
page,
|
|
peerManager,
|
|
}) => {
|
|
const { bob, eve } = await createCollaborators(peerManager);
|
|
const { rid } = await createRepo(eve, { name: "garden" });
|
|
await bob.startHttpd();
|
|
await useBackend(page, bob);
|
|
|
|
await page.goto("/inbox");
|
|
await page.getByRole("button", { name: "icon-plus", exact: true }).click();
|
|
const input = page.getByPlaceholder(/^RID, e\.g\./);
|
|
await input.fill(rid.replace(/^rad:/, ""));
|
|
await waitForCommand(page, "seed", () =>
|
|
page.getByRole("button", { name: "icon-seed Seed", exact: true }).click(),
|
|
);
|
|
|
|
await expect(page.getByRole("link", { name: /garden/ })).toBeVisible({
|
|
timeout: 20_000,
|
|
});
|
|
|
|
await page.getByRole("button", { name: "icon-plus", exact: true }).click();
|
|
await input.fill(rid);
|
|
await input.press("Enter");
|
|
await expect(
|
|
page.getByText(/This repo is already (seeded|queued for fetching)/),
|
|
).toBeVisible();
|
|
});
|