Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add visual test for code clipboard icon on hover
Sebastian Martinez committed 2 years ago
commit d315380e01e3a39f0cfa9509469ae8923e8d9f85
parent caf2cf0ae2f4ae88e9c8307fb5b71a2bffe6cb3e
1 file changed +12 -0
modified tests/visual/desktop/markdown.spec.ts
@@ -60,6 +60,18 @@ test.describe("markdown rendering basics", async () => {
    await expect(page).toHaveScreenshot();
  });

+
  test("code clipboard icon on hover", async ({ page }) => {
+
    await goToSection("#code", page);
+
    const codeBlock = page
+
      .locator("div.pre-wrapper")
+
      .filter({ hasText: "Inline `code` has `back-ticks" });
+
    await expect(
+
      codeBlock.locator("radicle-clipboard > .clipboard"),
+
    ).toBeHidden();
+
    await codeBlock.hover();
+
    await expect(page).toHaveScreenshot();
+
  });
+

  test("tables", async ({ page }) => {
    await goToSection("#tables", page);
    await expect(page.getByText("Tables aren't part of the")).toBeVisible();