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:
@@ -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(
|
||||
|
||||
@@ -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