Skip to content

Commit 1a064a1

Browse files
committed
Updates test message and adds default case
Fixes #716
1 parent 3e97f61 commit 1a064a1

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
@@ -288,23 +288,33 @@
288288
}, 50);
289289
});
290290

291-
describe('Plugin ae_addimages_ie', function (done) {
291+
describe('in IE browsers', function () {
292292
this.timeout(35000);
293293

294-
beforeEach(function(done) {
295-
initEditor.call(this, done, {
296-
extraPlugins: 'ae_dragresize'
297-
});
294+
beforeEach(function() {
295+
doTestIE.call(this);
298296
});
299297

300298
afterEach(function() {
301299
cleanUpEditor.call(this);
302300
});
303301

304-
it('should use it instead of ae_dragresize when browsers are IE', function() {
302+
it('should use the ae_dragresize_ie plugin instead of ae_dragresize by default', function(done) {
305303
doTestIE.call(this);
306304

307-
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
305+
initEditor.call(this, function() {
306+
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
307+
done();
308+
}.bind(this));
309+
});
310+
311+
it('should use the ae_dragresize_ie plugin even if the ae_dragresize is passed in the editor configuration', function(done) {
312+
initEditor.call(this, function() {
313+
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
314+
done();
315+
}.bind(this), {
316+
extraPlugins: 'ae_dragresize'
317+
});
308318
});
309319
});
310320
});

0 commit comments

Comments
 (0)