Skip to content

Commit

Permalink
[#66012] Add copy button test
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin committed Sep 20, 2024
1 parent 5a72366 commit d49d39e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/myst-editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("<h1>");
});
})

test.describe.parallel("With collaboration enabled", () => {
Expand Down

0 comments on commit d49d39e

Please sign in to comment.