diff --git a/README.md b/README.md index 74a41321d..99275a1d5 100644 --- a/README.md +++ b/README.md @@ -55,16 +55,27 @@ Like an HTML ` diff --git a/src/test/system/custom_element_test.js b/src/test/system/custom_element_test.js index 2e77e3fc4..2bd04093d 100644 --- a/src/test/system/custom_element_test.js +++ b/src/test/system/custom_element_test.js @@ -442,16 +442,24 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { 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() expectDocument("\n") }) + test("editor sanitizes initial value", async () => { + const element = getEditorElement() + + expectDocument("\n") + + assert.equal(element.innerHTML, "") + }) + 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") @@ -475,25 +483,12 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { testGroup("