-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENGCOM-6329: Added 'clearEvent' to eventBus to prevent multiple attac…
…h event on wysiwyg editor #25671
- Loading branch information
Showing
4 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
dev/tests/js/jasmine/tests/lib/mage/tinymce4Adapter.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
define([ | ||
'wysiwygAdapter', | ||
'underscore' | ||
], function (wysiwygAdapter, _) { | ||
'use strict'; | ||
|
||
var obj; | ||
|
||
beforeEach(function () { | ||
|
||
/** | ||
* Dummy constructor to use for instantiation | ||
* @constructor | ||
*/ | ||
var Constr = function () {}; | ||
|
||
Constr.prototype = wysiwygAdapter; | ||
|
||
obj = new Constr(); | ||
obj.eventBus = new window.varienEvents(); | ||
obj.initialize(1, { | ||
'store_id': 0, | ||
'tinymce4': { | ||
'content_css': '' | ||
}, | ||
'files_browser_window_url': 'url' | ||
}); | ||
obj.setup(); | ||
}); | ||
|
||
describe('"openFileBrowser" method', function () { | ||
it('Opens file browser to given instance', function () { | ||
expect(_.size(obj.eventBus.arrEvents['open_browser_callback'])).toBe(1); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters