commit 411772cff876f9719c0d6ad8de187292df10105e
parent 6f169d1244f2aa2fc976cd11c94ff870879681ed
Author: yerlan <temirerlan99@gmail.com>
Date: Thu, 1 Oct 2020 21:05:04 +0300
[+] add test for pruneInlineStyles
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/demo/src/test.js b/demo/src/test.js
@@ -125,6 +125,19 @@ describe('Regression Tests', () => {
});
+ it("should remove inline styles from element", () => {
+ const se = getEditor();
+ const content = node(
+ '<div style="position: static"></div><div style="position: static"></div>'
+ );
+
+ const pruned = se.pruneInlineStyles(content);
+ const testResult = pruned.querySelector('[style="position: static"]');
+ assert.notExists(testResult, "inline styles are pruned");
+ se.clearContent();
+});
+
+
it('should apply a scroll bar for large content after collapsing fullscreen', () => {
const se = getEditor();
se.editor.setAttribute('max-height', '300px');