Skip to content

Commit

Permalink
Updates test message and adds default case
Browse files Browse the repository at this point in the history
Fixes #716
  • Loading branch information
jbalsas committed Apr 11, 2017
1 parent e6c4abf commit f72f6e1
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/ui/react/test/alloy-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,23 +323,33 @@
});
});

describe('Plugin ae_addimages_ie', function (done) {
describe('in IE browsers', function () {
this.timeout(35000);

beforeEach(function(done) {
initEditor.call(this, done, {
extraPlugins: 'ae_dragresize'
});
beforeEach(function() {
doTestIE.call(this);
});

afterEach(function() {
cleanUpEditor.call(this);
});

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

assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
initEditor.call(this, function() {
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
done();
}.bind(this));
});

it('should use the ae_dragresize_ie plugin even if the ae_dragresize is passed in the editor configuration', function(done) {
initEditor.call(this, function() {
assert.isTrue(this.alloyEditor.get('nativeEditor').config.extraPlugins.indexOf('ae_dragresize_ie') >= 0);
done();
}.bind(this), {
extraPlugins: 'ae_dragresize'
});
});
});
});
Expand Down

0 comments on commit f72f6e1

Please sign in to comment.