Skip to content

Commit

Permalink
[#65830] fix copy test
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin authored and MaciejWas committed Oct 9, 2024
1 parent 8e46d5f commit df5b86c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/myst-editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ 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>");
const clipboardHandle = await page.waitForFunction(async () => await navigator.clipboard.readText());
expect(await clipboardHandle.evaluate(v => v)).toContain("<h1>");
});

test("Mermaid diagrams", async ({page}) => {
Expand Down

0 comments on commit df5b86c

Please sign in to comment.