diff --git a/tests/myst-editor.spec.ts b/tests/myst-editor.spec.ts index 9bcfd6b..58dfa9b 100644 --- a/tests/myst-editor.spec.ts +++ b/tests/myst-editor.spec.ts @@ -122,6 +122,13 @@ test.describe.parallel("With collaboration disabled", () => { ) }); }) + + test("Copy as HTML button copies to clipboard", async ({page, context}) => { + await context.grantPermissions(["clipboard-write", "clipboard-read"]); + await page.getByTitle("Copy document as HTML").click(); + const clipboardContent = await page.evaluate(() => navigator.clipboard.readText()); + expect(clipboardContent).toContain("

"); + }); }) test.describe.parallel("With collaboration enabled", () => {