diff --git a/src/test/system/custom_element_test.js b/src/test/system/custom_element_test.js index 2e77e3fc4..8eec7d3de 100644 --- a/src/test/system/custom_element_test.js +++ b/src/test/system/custom_element_test.js @@ -440,9 +440,17 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { return promise }) + test("editor resets to its original value on element reset", async () => { + const element = getEditorElement() + + await typeCharacters("hello") + element.reset() + expectDocument("\n") + }) + test("editor resets to its original value on form reset", async () => { const element = getEditorElement() - const { form } = element.inputElement + const { form } = element await typeCharacters("hello") form.reset() @@ -451,7 +459,7 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { test("editor resets to last-set value on form reset", async () => { const element = getEditorElement() - const { form } = element.inputElement + const { form } = element element.value = "hi" await typeCharacters("hello") @@ -461,7 +469,7 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { test("editor respects preventDefault on form reset", async () => { const element = getEditorElement() - const { form } = element.inputElement + const { form } = element const preventDefault = (event) => event.preventDefault() await typeCharacters("hello") @@ -514,4 +522,10 @@ testGroup("form property references its