Skip to content

Commit

Permalink
change tinymce text fill strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki committed Oct 18, 2024
1 parent ee75f44 commit 0c23372
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
15 changes: 5 additions & 10 deletions Products/CMFPlone/tests/robot/keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,12 @@ Fill text to tinymce editor

Sleep 1

Evaluate JavaScript //textarea[@name="${attr_name}"]
... (elem, text) => {
... elem["pattern-tinymce"].instance.tiny.setContent('${input}');
... }
... all_elements=False

Sleep 2s

${check}= Evaluate JavaScript //textarea[@name="${attr_name}"]
... (elem) => {
... return elem["pattern-tinymce"].instance.tiny.getContent();
... (elem, text) => {
... const tiny = window.tinymce.get(elem.getAttribute("id"));
... let input_text = "";
... tiny.setContent('${input}');
... return tiny.getContent();
... }
... all_elements=False

Expand Down
6 changes: 3 additions & 3 deletions Products/CMFPlone/tests/robot/test_controlpanel_filter.robot
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ success message should contain information regarding caching
Mark text heading as h1 in tinymce editor

# select the text `heading` via javascript
Evaluate JavaScript ${None}
... () => {
... let iframe_document = document.querySelector(".tox-edit-area iframe").contentDocument;
Evaluate JavaScript //div[contains(@class, 'tox-edit-area')]//iframe
... (elem, args) => {
... let iframe_document = elem.contentDocument;
... let body = iframe_document.body;
... let p = body.firstChild;
... let range = new Range();
Expand Down

0 comments on commit 0c23372

Please sign in to comment.