diff --git a/src/test/system/custom_element_test.js b/src/test/system/custom_element_test.js index 2e77e3fc4..c7f195919 100644 --- a/src/test/system/custom_element_test.js +++ b/src/test/system/custom_element_test.js @@ -471,12 +471,32 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { form.removeEventListener("reset", preventDefault, false) expectDocument("hello\n") }) + + test("editor resets to its original value on element reset", async () => { + const element = getEditorElement() + + await typeCharacters("hello") + element.reset() + expectDocument("\n") + }) + + test("element returns empty string when value is missing", async () => { + const element = getEditorElement() + + assert.equal(element.value, "") + }) + + test("editor returns its type", async() => { + const element = getEditorElement() + + assert.equal("trix-editor", element.type) + }) }) testGroup("