Show canonical branches and tags in peer selector

This commit is contained in:
Rūdolfs Ošiņš
2026-04-22 09:45:00 +02:00
parent 42bc27c1f8
commit ecbea99f56
14 changed files with 631 additions and 83 deletions
+1 -2
View File
@@ -349,8 +349,7 @@ test("peer and branch switching", async ({ page }) => {
await changeBranch("alice", "feature/branch", page);
await page.locator('[title="Change branch"]:visible').first().click();
await page
.getByRole("button", { name: "feature/branch" })
.first()
.getByRole("button", { name: "feature/branch 1aded56" })
.click();
await expect(
+9 -2
View File
@@ -6,8 +6,15 @@ import * as Path from "node:path";
export async function changeBranch(peer: string, branch: string, page: Page) {
await page.locator('[title="Change branch"]:visible').first().click();
const peerLocator = page.getByLabel("peer-item").filter({ hasText: peer });
await peerLocator.getByTitle("Expand peer").click();
await page.getByRole("button", { name: branch }).click();
const branchButton = page.getByRole("button", { name: branch });
const isVisible = await branchButton.isVisible().catch(() => false);
if (!isVisible) {
await peerLocator.getByTitle("Expand peer").click();
}
await branchButton.click();
}
// Create a repo using the rad CLI.