Files
radicle-explorer/explorer/tests/e2e/repo/issue.spec.ts
T
Brandon OxendineandRūdolfs Ošiņš efc6ae961f explorer: Add open in app to a share menu
Copy link becomes a split button like desktop's, which can also copy the
ID or rad: URI, or open the URI in whichever app handles it. Commits and
releases get their own share button too.

Browsers don't tell us whether the app opened, so instead of redirecting
we show a notice linking to the desktop download page, unless the window
loses focus within a second.

Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2026-11-13 13:54:42 +01:00

20 lines
767 B
TypeScript

import { test, cobUrl, expect } from "@tests/support/fixtures.js";
test("navigate single issue", async ({ page }) => {
await page.goto(`${cobUrl}/issues`);
await page.getByText("This title has **markdown**").click();
await expect(page).toHaveURL(/\/issues\/[0-9a-f]{40}/);
});
test("open in app offers the download page", async ({ page }) => {
await page.goto(`${cobUrl}/issues`);
await page.getByText("This title has **markdown**").click();
await page.getByRole("button", { name: "Share options" }).click();
await page.getByText("Open in app").click();
await expect(page.getByRole("status")).toContainText("Didn't open?");
await page.getByRole("link", { name: "Get Radicle Desktop" }).click();
await expect(page).toHaveURL(/\/desktop$/);
});