mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Show canonical branches and tags in peer selector
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user