Fix paste e2e tests for firefox

This commit is contained in:
Zef Hemel
2026-04-12 10:51:20 +02:00
parent c9f93dccde
commit a7ed4e074c
+4 -2
View File
@@ -26,8 +26,9 @@ test.describe("Rich text paste", () => {
const event = new ClipboardEvent("paste", {
bubbles: true,
cancelable: true,
clipboardData,
});
// Firefox ignores clipboardData in the constructor, so set it via defineProperty
Object.defineProperty(event, "clipboardData", { value: clipboardData });
document.querySelector("#sb-editor .cm-content")!
.dispatchEvent(event);
},
@@ -66,8 +67,9 @@ test.describe("Rich text paste", () => {
const event = new ClipboardEvent("paste", {
bubbles: true,
cancelable: true,
clipboardData,
});
// Firefox ignores clipboardData in the constructor, so set it via defineProperty
Object.defineProperty(event, "clipboardData", { value: clipboardData });
document.querySelector("#sb-editor .cm-content")!
.dispatchEvent(event);
},