Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Improve e2e clipboard tests
Sebastian Martinez committed 1 year ago
commit ebc8b3236b2d8414ff3754cee69bbea5be8b2787
parent 653cf9a48d11dd67fddbbbc6f6a195223bf1445d
1 file changed +2 -1
modified tests/e2e/clipboard.spec.ts
@@ -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()",
    );