Files
radicle-explorer/explorer/tests/e2e/repo/issues.spec.ts
T
Rūdolfs Ošiņš e37521c739 Move explorer into explorer/
Makes explorer and desktop sibling projects, as proposed in ADR 1.
This commit only moves files; paths in CI, scripts and docs are fixed
in the following commits.
2026-10-22 11:06:33 +02:00

49 lines
1.3 KiB
TypeScript

import { test, cobUrl, expect } from "@tests/support/fixtures.js";
import { createRepo } from "@tests/support/repo";
test("navigate issue listing", async ({ page }) => {
await page.goto(cobUrl);
await page.waitForLoadState("networkidle");
await page.getByRole("link", { name: "Issues 1" }).click();
await expect(page).toHaveURL(`${cobUrl}/issues`);
await page.getByRole("link", { name: "Closed" }).click();
await expect(page).toHaveURL(`${cobUrl}/issues?status=closed`);
});
test("issue counters", async ({ page, peer }) => {
const { rid, repoFolder } = await createRepo(peer, {
name: "issue-counters",
});
await peer.rad(
[
"issue",
"open",
"--title",
"First issue to test counters",
"--description",
"Let's see",
],
{ cwd: repoFolder },
);
await page.goto(`${peer.uiUrl()}/${rid}/issues`);
await peer.rad(
[
"issue",
"open",
"--title",
"Second issue to test counters",
"--description",
"Let's see",
],
{ cwd: repoFolder },
);
await page.getByRole("link", { name: "Open" }).first().click();
await expect(page.getByRole("button", { name: "Issues 2" })).toBeVisible();
await expect(page.locator(".issue-teaser")).toHaveCount(2);
await page
.getByRole("link", { name: "First issue to test counters" })
.click();
});