Skip to content

Commit

Permalink
Merge pull request #869 from plone/sunew-fix-tests-reload-error
Browse files Browse the repository at this point in the history
Fix error when running tests: "Some of your tests did a full page reload"
  • Loading branch information
frapell authored Sep 18, 2018
2 parents 7023f8b + 98f2158 commit 37ae9de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Bug fixes:
registered!" warnings by setting dummy name and trigger properties.
[sunew]

- Fix error when running tests: "Some of your tests did a full page reload!", due to a form submit with no preventDefault.
[sunew]


2.7.4 (2018-06-21)
------------------
Expand Down
4 changes: 4 additions & 0 deletions mockup/tests/pattern-tinymce-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ define([
var changed_txt = 'changed contents';
$editable.html(changed_txt);
var $form = $container.find('form');
// Avoid error when running tests: "Some of your tests did a full page reload!"
$container.submit(function(e) {
e.preventDefault();
});
$container.trigger('submit');
expect($el.val()).to.be.equal(changed_txt);
tinymce.get(0).remove();
Expand Down

0 comments on commit 37ae9de

Please sign in to comment.