Add visual test for code clipboard icon on hover

This commit is contained in:
Sebastian Martinez
2024-03-04 22:08:57 +01:00
parent caf2cf0ae2
commit d315380e01
+12
View File
@@ -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();