mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-25 14:50:30 +08:00
Improve e2e clipboard tests
Instead of trying to copy the RID of the first repo card, try to copy the one you later expect.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { chromium } from "playwright";
|
||||
|
||||
import { expect, markdownRid, test } from "@tests/support/fixtures.js";
|
||||
import { formatRepositoryId } from "@app/lib/utils";
|
||||
|
||||
// We explicitly run all clipboard tests withing the context of a single test
|
||||
// so that we don't run into race conditions, because there is no way to isolate
|
||||
@@ -18,7 +19,7 @@ test("copy to clipboard", async () => {
|
||||
|
||||
// Repo ID.
|
||||
{
|
||||
await page.getByLabel("repo-id").first().click();
|
||||
await page.getByText(formatRepositoryId(markdownRid)).click();
|
||||
const clipboardContent = await page.evaluate<string>(
|
||||
"navigator.clipboard.readText()",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user