Skip to content

Commit f72f6e1

Browse files
committed
Updates test message and adds default case
Fixes #716
1 parent e6c4abf commit f72f6e1

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/ui/react/test/alloy-editor.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,23 +323,33 @@
323323
});
324324
});
325325

326-
describe('Plugin ae_addimages_ie', function (done) {
326+
describe('in IE browsers', function () {
327327
this.timeout(35000);
328328

329-
beforeEach(function(done) {
330-
initEditor.call(this, done, {
331-
extraPlugins: 'ae_dragresize'
332-
});
329+
beforeEach(function() {
330+
doTestIE.call(this);
333331
});
334332

335333
afterEach(function() {
336334
cleanUpEditor.call(this);
337335
});
338336

339-
it('should use it instead of ae_dragresize when browsers are IE', function() {
337+
it('should use the ae_dragresize_ie plugin instead of ae_dragresize by default', function(done) {
340338
doTestIE.call(this);
341339

342-
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
340+
initEditor.call(this, function() {
341+
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
342+
done();
343+
}.bind(this));
344+
});
345+
346+
it('should use the ae_dragresize_ie plugin even if the ae_dragresize is passed in the editor configuration', function(done) {
347+
initEditor.call(this, function() {
348+
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
349+
done();
350+
}.bind(this), {
351+
extraPlugins: 'ae_dragresize'
352+
});
343353
});
344354
});
345355
});

0 commit comments

Comments
 (0)