mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Convert the vertical sidebar navigation (Source, Issues, Patches) into a horizontal tab bar above the content area. The ContextRepo info moves into a popover behind an info button in the tab bar. Mobile footer navigation is preserved for small screens, with the tab bar hidden on mobile.
49 lines
1.3 KiB
TypeScript
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();
|
|
});
|